From 4035bf16e75acde1ef77d8a176edc95dbad70f35 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 27 Aug 2012 09:15:48 +0000 Subject: Fix #31853: Marker deletion invokes strip deletion --- source/blender/editors/space_sequencer/sequencer_edit.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 81699d36f5f..5a40c2ce4e7 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -1668,6 +1668,20 @@ static int sequencer_delete_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } +static int sequencer_delete_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + ARegion *ar = CTX_wm_region(C); + + if (ar->regiontype == RGN_TYPE_WINDOW) { + /* bounding box of 30 pixels is used for markers shortcuts, + * prevent conflict with markers shortcurts here + */ + if (event->mval[1] <= 30) + return OPERATOR_PASS_THROUGH; + } + + return WM_operator_confirm(C, op, event); +} void SEQUENCER_OT_delete(wmOperatorType *ot) { @@ -1678,7 +1692,7 @@ void SEQUENCER_OT_delete(wmOperatorType *ot) ot->description = "Erase selected strips from the sequencer"; /* api callbacks */ - ot->invoke = WM_operator_confirm; + ot->invoke = sequencer_delete_invoke; ot->exec = sequencer_delete_exec; ot->poll = sequencer_edit_poll; -- cgit v1.2.3