Skip to content

Commit

Permalink
fix for issue geo-data#2
Browse files Browse the repository at this point in the history
  • Loading branch information
thbaumann committed Jun 14, 2018
1 parent 0727573 commit 69159cf
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions plugin/quickdraw.py
Expand Up @@ -90,7 +90,8 @@ def initGui(self):
self.iface.addPluginToMenu(u"&Quick Draw", self.action)

QObject.connect(self.dlg.clearButton, SIGNAL("clicked()"), self.clearButtonClicked)
self.dlg.buttonBox.clicked.connect(self.buttonBoxClicked)
self.dlg.buttonBox.button(QDialogButtonBox.Reset).clicked.connect(self.buttonBoxReset)
self.dlg.buttonBox.button(QDialogButtonBox.Apply).clicked.connect(self.buttonBoxApply)
self.dlg.exampleComboBox.activated.connect(self.exampleSelected)

def unload(self):
Expand All @@ -99,13 +100,12 @@ def unload(self):
self.iface.removeToolBarIcon(self.action)
self.removeItems()

def buttonBoxClicked(self, button):
button_text = str(button.text())
if button_text == 'Apply':
self.draw()
self.applied = True
elif button_text == 'Reset':
self.resetText()
def buttonBoxReset(self, button):
self.resetText()

def buttonBoxApply(self, button):
self.draw()
self.applied = True

def clearButtonClicked(self):
self.dlg.geometryTextEdit.setPlainText('')
Expand Down

0 comments on commit 69159cf

Please sign in to comment.