From f876c17efd25eae5ece52a4bef097acfd6580b3b Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sat, 31 Oct 2009 05:50:01 +0000 Subject: [PATCH] Fix crash when removing multiple torrents --- deluge/ui/gtkui/removetorrentdialog.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deluge/ui/gtkui/removetorrentdialog.py b/deluge/ui/gtkui/removetorrentdialog.py index 66b531b9b..071992ba5 100644 --- a/deluge/ui/gtkui/removetorrentdialog.py +++ b/deluge/ui/gtkui/removetorrentdialog.py @@ -83,11 +83,12 @@ class RemoveTorrentDialog(object): button_data.set_label(pluralize_torrents(button_data.get_label())) def __remove_torrents(self, remove_data): - for torrent_id in self.__torrent_ids: - client.core.remove_torrent(torrent_id, remove_data) # Unselect all to avoid issues with the selection changed event component.get("TorrentView").treeview.get_selection().unselect_all() + for torrent_id in self.__torrent_ids: + client.core.remove_torrent(torrent_id, remove_data) + def run(self): """ Shows the dialog and awaits for user input. The user can select to