Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
fixed comments in remove project action
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT committed Aug 19, 2021
1 parent 0e0d06b commit 126a874
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion openpype/hosts/maya/api/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def launch_workfiles_app(*_args, **_kwargs):
def remove_project_manager():
top_menu = _get_menu()

# Try to find workfile tool action in the menu
# Try to find "System" menu action in the menu
system_menu = None
for action in top_menu.actions():
if action.text() == "System":
Expand All @@ -96,12 +96,14 @@ def remove_project_manager():
if system_menu is None:
return

# Try to find "Project manager" action in "System" menu
project_manager_action = None
for action in system_menu.menu().children():
if hasattr(action, "text") and action.text() == "Project Manager":
project_manager_action = action
break

# Remove "Project manager" action if was found
if project_manager_action is not None:
system_menu.menu().removeAction(project_manager_action)

Expand Down

0 comments on commit 126a874

Please sign in to comment.