Fix T59526: VSE Add submenus for clips/masks dont show with only one
item
This commit is contained in:
@@ -329,7 +329,7 @@ class SEQUENCER_MT_add(Menu):
|
||||
if len(bpy.data.movieclips) > 10:
|
||||
layout.operator_context = 'INVOKE_DEFAULT'
|
||||
layout.operator("sequencer.movieclip_strip_add", text="Clip...", icon='CLIP')
|
||||
elif len(bpy.data.movieclips) > 1:
|
||||
elif len(bpy.data.movieclips) > 0:
|
||||
layout.operator_menu_enum("sequencer.movieclip_strip_add", "clip", text="Clip", icon='CLIP')
|
||||
else:
|
||||
layout.menu("SEQUENCER_MT_add_empty", text="Clip", icon='CLIP')
|
||||
@@ -337,7 +337,7 @@ class SEQUENCER_MT_add(Menu):
|
||||
if len(bpy.data.masks) > 10:
|
||||
layout.operator_context = 'INVOKE_DEFAULT'
|
||||
layout.operator("sequencer.mask_strip_add", text="Mask...", icon='MOD_MASK')
|
||||
elif len(bpy.data.masks) > 1:
|
||||
elif len(bpy.data.masks) > 0:
|
||||
layout.operator_menu_enum("sequencer.mask_strip_add", "mask", text="Mask", icon='MOD_MASK')
|
||||
else:
|
||||
layout.menu("SEQUENCER_MT_add_empty", text="Mask", icon='MOD_MASK')
|
||||
|
||||
Reference in New Issue
Block a user