UI: show confirmation for metaball delete
authorCampbell Barton <ideasman42@gmail.com>
Tue, 9 Oct 2018 22:41:44 +0000 (09:41 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 9 Oct 2018 23:31:48 +0000 (10:31 +1100)
Matches other modes.

release/scripts/startup/bl_ui/space_view3d.py
source/blender/editors/metaball/mball_edit.c

index cf0f710a05a7d24dbaca5a993287dc7047cfec2e..d9f48ffc2b6d2af3ad905d2eac7d961f82f099a4 100644 (file)
@@ -3407,7 +3407,9 @@ class VIEW3D_MT_edit_meta(Menu):
         layout.separator()
 
         layout.menu("VIEW3D_MT_edit_meta_showhide")
-        layout.operator("mball.delete_metaelems", text="Delete...")
+
+        layout.operator_context = 'EXEC_DEFAULT'
+        layout.operator("mball.delete_metaelems", text="Delete")
 
 
 class VIEW3D_MT_edit_meta_showhide(Menu):
index 06add39d90f975bb7c70a7151f7a6b1d14b1c2d1..8cb4bfba5f56419a62ab363f767e62a22c1dd88a 100644 (file)
@@ -508,6 +508,7 @@ void MBALL_OT_delete_metaelems(wmOperatorType *ot)
        ot->idname = "MBALL_OT_delete_metaelems";
 
        /* callback functions */
+       ot->invoke = WM_operator_confirm;
        ot->exec = delete_metaelems_exec;
        ot->poll = ED_operator_editmball;