mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
skip action if does not have any projects which can be used as source for values
This commit is contained in:
parent
8270f2fc40
commit
8e71919145
1 changed files with 10 additions and 5 deletions
|
|
@ -299,13 +299,18 @@ class BaseWidget(QtWidgets.QWidget):
|
|||
if self.entity.is_dynamic_item or self.entity.is_in_dynamic_item:
|
||||
return
|
||||
|
||||
current_project_name = self.category_widget.project_name
|
||||
project_names = []
|
||||
for project_name in self.category_widget.get_project_names():
|
||||
if project_name != current_project_name:
|
||||
project_names.append(project_name)
|
||||
|
||||
if not project_names:
|
||||
return
|
||||
|
||||
submenu = QtWidgets.QMenu("Apply values from", menu)
|
||||
|
||||
current_project_name = self.category_widget.project_name
|
||||
for project_name in self.category_widget.get_project_names():
|
||||
if current_project_name == project_name:
|
||||
continue
|
||||
|
||||
for project_name in project_names:
|
||||
if project_name is None:
|
||||
project_name = DEFAULT_PROJECT_LABEL
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue