skip action if does not have any projects which can be used as source for values

This commit is contained in:
iLLiCiTiT 2021-12-08 13:25:22 +01:00
parent 8270f2fc40
commit 8e71919145

View file

@ -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