Fix Strip->Split menu entry not working after recent change

Caused by bfe6128748.

The split frame logic actually became inverted in the update:
when the cursor position is true, then the frame is supposed
to be initialized in the invoke().

The menu does not use cursor position, so the code path where
the frame is retrieved from the RNA properties was used, and
the frame was never initialized in that case.

Pull Request: https://projects.blender.org/blender/blender/pulls/114973
This commit is contained in:
Sergey Sharybin
2023-11-16 10:40:37 +01:00
committed by Sergey Sharybin
parent 31c1207c1a
commit 5ef5567b82

View File

@@ -1429,8 +1429,10 @@ static int sequencer_split_exec(bContext *C, wmOperator *op)
const bool use_cursor_position = RNA_boolean_get(op->ptr, "use_cursor_position");
const int split_frame = use_cursor_position ? scene->r.cfra : RNA_int_get(op->ptr, "frame");
const int split_channel = use_cursor_position ? 0 : RNA_int_get(op->ptr, "channel");
const int split_frame = RNA_struct_property_is_set(op->ptr, "frame") ?
RNA_int_get(op->ptr, "frame") :
scene->r.cfra;
const int split_channel = RNA_int_get(op->ptr, "channel");
const eSeqSplitMethod method = eSeqSplitMethod(RNA_enum_get(op->ptr, "type"));
const int split_side = sequence_split_side_for_exec_get(op);