Skip to content

Commit bfdfc6d

Browse files
committed
Removed the single "Clips" menu level
1 parent 1f3393a commit bfdfc6d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/windows/views/properties_tableview.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -474,11 +474,10 @@ def contextMenuEvent(self, event):
474474
"value": effect_id,
475475
"selected": False,
476476
"icon": effect_icon})
477-
clip_choices.append({"name": clip_instance_data["title"],
477+
self.choices.append({"name": _(clip_instance_data["title"]),
478478
"value": effect_choices,
479479
"selected": False,
480480
"icon": clip_instance_icon})
481-
self.choices.append({"name": _("Clips"), "value": clip_choices, "selected": False, "icon": None})
482481

483482

484483
# Handle selected object options (ObjectDetection effect)
@@ -528,11 +527,10 @@ def contextMenuEvent(self, event):
528527
if (clip_path == clip_instance_path):
529528
# Generate the clip icon to show in the selection menu
530529
clip_instance_icon = clip_index.data(Qt.DecorationRole)
531-
clip_choices.append({"name": clip_instance_data["title"],
530+
self.choices.append({"name": clip_instance_data["title"],
532531
"value": clip_instance_id,
533532
"selected": False,
534533
"icon": clip_instance_icon})
535-
self.choices.append({"name": _("Clips"), "value": clip_choices, "selected": False, "icon": None})
536534

537535
# Handle clip attach options
538536
if property_key == "parentObjectId" and not self.choices:
@@ -756,7 +754,11 @@ def contextMenuEvent(self, event):
756754
# Divide into smaller QMenus (since large lists cover the entire screen)
757755
# For example: Transitions -> 1 -> sub items
758756
SubMenu = None
759-
SubMenuRoot = menu.addMenu(_(choice["name"]))
757+
if choice["icon"] is not None:
758+
SubMenuRoot = menu.addMenu(choice["icon"], _(choice["name"]))
759+
else:
760+
SubMenuRoot = menu.addMenu(_(choice["name"]))
761+
760762
SubMenuSize = 25
761763
SubMenuNumber = 0
762764
if len(choice["value"]) > SubMenuSize:

0 commit comments

Comments
 (0)