Skip to content

Commit 69159cf

Browse files
committed
fix for issue geo-data#2
geo-data#2
1 parent 0727573 commit 69159cf

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

plugin/quickdraw.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ def initGui(self):
9090
self.iface.addPluginToMenu(u"&Quick Draw", self.action)
9191

9292
QObject.connect(self.dlg.clearButton, SIGNAL("clicked()"), self.clearButtonClicked)
93-
self.dlg.buttonBox.clicked.connect(self.buttonBoxClicked)
93+
self.dlg.buttonBox.button(QDialogButtonBox.Reset).clicked.connect(self.buttonBoxReset)
94+
self.dlg.buttonBox.button(QDialogButtonBox.Apply).clicked.connect(self.buttonBoxApply)
9495
self.dlg.exampleComboBox.activated.connect(self.exampleSelected)
9596

9697
def unload(self):
@@ -99,13 +100,12 @@ def unload(self):
99100
self.iface.removeToolBarIcon(self.action)
100101
self.removeItems()
101102

102-
def buttonBoxClicked(self, button):
103-
button_text = str(button.text())
104-
if button_text == 'Apply':
105-
self.draw()
106-
self.applied = True
107-
elif button_text == 'Reset':
108-
self.resetText()
103+
def buttonBoxReset(self, button):
104+
self.resetText()
105+
106+
def buttonBoxApply(self, button):
107+
self.draw()
108+
self.applied = True
109109

110110
def clearButtonClicked(self):
111111
self.dlg.geometryTextEdit.setPlainText('')

0 commit comments

Comments
 (0)