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):
|
def on_menuitem_remove_activate(self, data=None):
|
||||||
log.debug("on_menuitem_remove_activate")
|
log.debug("on_menuitem_remove_activate")
|
||||||
from removetorrentdialog import RemoveTorrentDialog
|
torrent_ids = component.get("TorrentView").get_selected_torrents()
|
||||||
RemoveTorrentDialog(component.get("TorrentView").get_selected_torrents()).run()
|
if torrent_ids:
|
||||||
|
from removetorrentdialog import RemoveTorrentDialog
|
||||||
|
RemoveTorrentDialog().run()
|
||||||
|
|
||||||
def on_menuitem_recheck_activate(self, data=None):
|
def on_menuitem_recheck_activate(self, data=None):
|
||||||
log.debug("on_menuitem_recheck_activate")
|
log.debug("on_menuitem_recheck_activate")
|
||||||
|
|
Loading…
Reference in New Issue