mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-08 09:28:41 +00:00
only show torrent menu if a torrent is selected
This commit is contained in:
parent
d17092b20d
commit
ca66946169
1 changed files with 1 additions and 1 deletions
|
@ -414,7 +414,7 @@ class TorrentView(listview.ListView, component.Component):
|
||||||
"""This is a callback for showing the right-click context menu."""
|
"""This is a callback for showing the right-click context menu."""
|
||||||
log.debug("on_button_press_event")
|
log.debug("on_button_press_event")
|
||||||
# We only care about right-clicks
|
# We only care about right-clicks
|
||||||
if event.button == 3:
|
if self.get_selected_torrents() and event.button == 3:
|
||||||
# Show the Torrent menu from the MenuBar
|
# Show the Torrent menu from the MenuBar
|
||||||
torrentmenu = component.get("MenuBar").torrentmenu
|
torrentmenu = component.get("MenuBar").torrentmenu
|
||||||
torrentmenu.popup(None, None, None, event.button, event.time)
|
torrentmenu.popup(None, None, None, event.button, event.time)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue