Skip to content

Commit 05e0b32

Browse files
committed
menu command show/hide functions.
1 parent 70e8300 commit 05e0b32

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

NodeGraphQt/base/menu.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,3 +294,15 @@ def run_command(self):
294294
execute the menu command.
295295
"""
296296
self.qaction.trigger()
297+
298+
def show(self):
299+
"""
300+
Set the command to be visible in the context menu.
301+
"""
302+
self.qaction.setVisible(True)
303+
304+
def hide(self):
305+
"""
306+
Set the command to be hidden in the context menu.
307+
"""
308+
self.qaction.setVisible(False)

0 commit comments

Comments
 (0)