diff options
author | Henry Kwan <piengeng@users.noreply.github.com> | 2022-02-12 18:50:23 +0800 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2022-02-13 13:55:54 +0000 |
commit | 191549074c10a3f758ece7308760408defd43ba2 (patch) | |
tree | f4d304c10127a58c7cd89bd04e4a8334fa52b3c4 | |
parent | 2ec6e10c8eb87a6f4e2a49afd58485adb13702a5 (diff) | |
download | deluge-191549074c10a3f758ece7308760408defd43ba2.tar.gz deluge-191549074c10a3f758ece7308760408defd43ba2.tar.bz2 deluge-191549074c10a3f758ece7308760408defd43ba2.zip |
[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
-rw-r--r-- | deluge/ui/gtk3/options_tab.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/deluge/ui/gtk3/options_tab.py b/deluge/ui/gtk3/options_tab.py index 48733d129..b0411a8b6 100644 --- a/deluge/ui/gtk3/options_tab.py +++ b/deluge/ui/gtk3/options_tab.py @@ -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) |