Fix uncaught exception when the remove torrent button is pressed when no torrents are selected
This commit is contained in:
parent
45a6ea5a19
commit
dbf685f178
|
@ -293,8 +293,10 @@ class MenuBar(component.Component):
|
|||
|
||||
def on_menuitem_remove_activate(self, data=None):
|
||||
log.debug("on_menuitem_remove_activate")
|
||||
torrent_ids = component.get("TorrentView").get_selected_torrents()
|
||||
if torrent_ids:
|
||||
from removetorrentdialog import RemoveTorrentDialog
|
||||
RemoveTorrentDialog(component.get("TorrentView").get_selected_torrents()).run()
|
||||
RemoveTorrentDialog().run()
|
||||
|
||||
def on_menuitem_recheck_activate(self, data=None):
|
||||
log.debug("on_menuitem_recheck_activate")
|
||||
|
|
Loading…
Reference in New Issue