Skip to content

Commit 6b8899b

Browse files
committed
Only run the actions if the user actually clicks OK!
1 parent 704f756 commit 6b8899b

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Form/formactions.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,13 @@ def run(self):
225225
self._config.set('interface.form-actions-vert-position', root_y)
226226
self._config.save()
227227

228-
# run the selected actions
229-
for action_type_row in self.model:
230-
for action_row in action_type_row.iterchildren():
231-
if action_row.model.get_value(action_row.iter, self.RUN_ACTION_COL):
232-
command = action_row.model.get_value(action_row.iter, self.ACTION_COMMAND_COL)
233-
(command)(self.dbstate, self.uistate, self.track)
228+
if response == Gtk.ResponseType.OK:
229+
# run the selected actions
230+
for action_type_row in self.model:
231+
for action_row in action_type_row.iterchildren():
232+
if action_row.model.get_value(action_row.iter, self.RUN_ACTION_COL):
233+
command = action_row.model.get_value(action_row.iter, self.ACTION_COMMAND_COL)
234+
(command)(self.dbstate, self.uistate, self.track)
234235

235236
self.top.destroy()
236237

0 commit comments

Comments
 (0)