Skip to content

Commit 69db6be

Browse files
committed
exposed NodeGraphCommand.set_hidden() func #351
1 parent 5b742c8 commit 69db6be

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

NodeGraphQt/base/menu.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,15 @@ def set_enabled(self, state):
304304
"""
305305
self.qaction.setEnabled(state)
306306

307+
def set_hidden(self, hidden):
308+
"""
309+
Sets then command item visibility in the context menu.
310+
311+
Args:
312+
hidden (bool): true to hide the command item.
313+
"""
314+
self.qaction.setVisible(hidden)
315+
307316
def show(self):
308317
"""
309318
Set the command to be visible in the context menu.

0 commit comments

Comments
 (0)