Fix: GPv3: Move to layer operator doesn't do anything

The 'move to layer' operator in GPv3 wasn't doing anything, since the `exec` function wasn't called by the operator's `invoke`.
Caused by b37ee403b2.

This PR fixes that.

Pull Request: https://projects.blender.org/blender/blender/pulls/118793
This commit is contained in:
Sietse Brouwer
2024-02-27 11:54:21 +01:00
committed by Falk David
parent 66a8cb6f72
commit 23ef8cc8e7

View File

@@ -1696,15 +1696,6 @@ static void GREASE_PENCIL_OT_stroke_reorder(wmOperatorType *ot)
/** \name Move To Layer Operator
* \{ */
static int grease_pencil_move_to_layer_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
const bool add_new_layer = RNA_boolean_get(op->ptr, "add_new_layer");
if (add_new_layer) {
return WM_operator_props_popup_confirm(C, op, event);
}
return OPERATOR_RUNNING_MODAL;
}
static int grease_pencil_move_to_layer_exec(bContext *C, wmOperator *op)
{
using namespace bke::greasepencil;
@@ -1788,6 +1779,15 @@ static int grease_pencil_move_to_layer_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
static int grease_pencil_move_to_layer_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
const bool add_new_layer = RNA_boolean_get(op->ptr, "add_new_layer");
if (add_new_layer) {
return WM_operator_props_popup_confirm(C, op, event);
}
return grease_pencil_move_to_layer_exec(C, op);
}
static void GREASE_PENCIL_OT_move_to_layer(wmOperatorType *ot)
{
PropertyRNA *prop;