File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,8 @@ def initGui(self):
90
90
self .iface .addPluginToMenu (u"&Quick Draw" , self .action )
91
91
92
92
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 )
94
95
self .dlg .exampleComboBox .activated .connect (self .exampleSelected )
95
96
96
97
def unload (self ):
@@ -99,13 +100,12 @@ def unload(self):
99
100
self .iface .removeToolBarIcon (self .action )
100
101
self .removeItems ()
101
102
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
109
109
110
110
def clearButtonClicked (self ):
111
111
self .dlg .geometryTextEdit .setPlainText ('' )
You can’t perform that action at this time.
0 commit comments