Skip to content

Commit

Permalink
Merge pull request #2705 from SebDieBln/FixVectorGridLock
Browse files Browse the repository at this point in the history
[fTools] restore 1:1 ratio when checking 'Lock 1:1 ratio' checkbox
  • Loading branch information
alexbruy committed Jan 26, 2016
2 parents 21b095d + e4ee315 commit beaa45e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/plugins/fTools/tools/doVectorGrid.py
Expand Up @@ -48,6 +48,7 @@ def __init__(self, iface):
QObject.connect(self.btnUpdate, SIGNAL("clicked()"), self.updateLayer)
QObject.connect(self.btnCanvas, SIGNAL("clicked()"), self.updateCanvas)
QObject.connect(self.chkAlign, SIGNAL("toggled(bool)"), self.chkAlignToggled)
QObject.connect(self.chkLock, SIGNAL("toggled(bool)"), self.chkLockToggled)
self.buttonOk = self.buttonBox_2.button(QDialogButtonBox.Ok)
self.setWindowTitle(self.tr("Vector grid"))
self.xMin.setValidator(QDoubleValidator(self.xMin))
Expand Down Expand Up @@ -334,6 +335,10 @@ def outFile(self):
return
self.outShape.setText(self.shapefileName)

def chkLockToggled(self, checked):
if checked:
self.spnY.setValue(self.spnX.value())

def chkAlignToggled(self):
if self.chkAlign.isChecked():
self.spnX.setEnabled(False)
Expand Down

0 comments on commit beaa45e

Please sign in to comment.