Fix crash when removing multiple torrents

This commit is contained in:
Andrew Resch 2009-10-31 05:50:01 +00:00
parent ee7f4e452d
commit f876c17efd
1 changed files with 3 additions and 2 deletions

View File

@ -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