[GTK] Fix ui logic/bug of checked move_completed

if move_completed is checked/True, options should be updated, not the
other way round

The path was updated the first time the move_completed option is selected
and then ignored on further updated to the path.

Fixed by checking instead if the path has changed.

Closes: https://github.com/deluge-torrent/deluge/pull/374
This commit is contained in:
Henry Kwan 2022-02-12 18:50:23 +08:00 committed by Calum Lind
parent 2ec6e10c8e
commit 191549074c
No known key found for this signature in database
GPG Key ID: 90597A687B836BA3

View File

@ -188,8 +188,9 @@ class OptionsTab(Tab):
):
options[status_key] = widget_value
if options.get('move_completed', False):
options['move_completed_path'] = self.move_completed_path_chooser.get_text()
move_completed_path = self.move_completed_path_chooser.get_text()
if move_completed_path != self.prev_status['move_completed_path']:
options['move_completed_path'] = move_completed_path
client.core.set_torrent_options(self.prev_torrent_ids, options)
self.button_apply.set_sensitive(False)