GPencil: Replace Separate menu by operator Enum to display assigned key
As the operator was using a menu, the keymap was not displayed. Now, the operator is used directly and don't need the menu.
This commit is contained in:
@@ -590,16 +590,6 @@ class GPENCIL_MT_snap(Menu):
|
||||
layout.operator("view3d.snap_cursor_to_grid", text="Cursor to Grid")
|
||||
|
||||
|
||||
class GPENCIL_MT_separate(Menu):
|
||||
bl_label = "Separate"
|
||||
|
||||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
layout.operator("gpencil.stroke_separate", text="Selected Points").mode = 'POINT'
|
||||
layout.operator("gpencil.stroke_separate", text="Selected Strokes").mode = 'STROKE'
|
||||
layout.operator("gpencil.stroke_separate", text="Active Layer").mode = 'LAYER'
|
||||
|
||||
|
||||
class GPENCIL_MT_gpencil_draw_delete(Menu):
|
||||
bl_label = "GPencil Draw Delete"
|
||||
|
||||
@@ -931,7 +921,6 @@ classes = (
|
||||
GPENCIL_MT_pie_sculpt,
|
||||
|
||||
GPENCIL_MT_snap,
|
||||
GPENCIL_MT_separate,
|
||||
GPENCIL_MT_cleanup,
|
||||
|
||||
GPENCIL_MT_gpencil_draw_delete,
|
||||
|
||||
@@ -6292,7 +6292,7 @@ class VIEW3D_MT_gpencil_edit_context_menu(Menu):
|
||||
|
||||
layout.operator("gpencil.stroke_join", text="Join").type = 'JOIN'
|
||||
layout.operator("gpencil.stroke_join", text="Join & Copy").type = 'JOINCOPY'
|
||||
layout.menu("GPENCIL_MT_separate", text="Separate")
|
||||
layout.operator_menu_enum("gpencil.stroke_separate", "mode")
|
||||
layout.operator("gpencil.stroke_split", text="Split")
|
||||
op = layout.operator("gpencil.stroke_cyclical_set", text="Close")
|
||||
op.type = 'CLOSE'
|
||||
|
||||
Reference in New Issue
Block a user