Skip to content

Commit

Permalink
Prevent empty context menus from appearing on Property table view
Browse files Browse the repository at this point in the history
  • Loading branch information
jonoomph committed Jul 8, 2024
1 parent 06e6d0d commit 7e2146d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/windows/views/properties_tableview.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,8 @@ def contextMenuEvent(self, event):
self.menu = self.build_menu(self.choices, menu)

# Show context menu (if any options present)
if self.menu.children():
# There is always at least 1 QAction in an empty menu though
if len(self.menu.children()) > 1:
self.menu.popup(event.globalPos())

def build_menu(self, data, parent_menu=None):
Expand Down

0 comments on commit 7e2146d

Please sign in to comment.