From 9b17d39ce031cb89a3e4ea8cbdd0bceb4612871d Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 16 Nov 2011 19:22:14 +0000 Subject: Fix #29260: Missing "Extend" parameter for Border Select Added "Extend" flag to border select operators for editors: - UV Editor - Sequencer - NLA - Info Space - Graph Editor - File Browser - Clip Editor - Action Editor - Channels and markers regions Can be used for custom keymaps. --- source/blender/editors/space_graph/graph_select.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_graph') diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 9fb880e0bc6..2ba79ee230a 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -289,11 +289,17 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op) rcti rect; short mode=0, selectmode=0; short incl_handles; + int extend; /* get editor data */ if (ANIM_animdata_get_context(C, &ac) == 0) return OPERATOR_CANCELLED; - + + /* clear all selection if not extending selection */ + extend= RNA_boolean_get(op->ptr, "extend"); + if (!extend) + deselect_graph_keys(&ac, 1, SELECT_SUBTRACT, TRUE); + /* get select mode * - 'gesture_mode' from the operator specifies how to select * - 'include_handles' from the operator specifies whether to include handles in the selection @@ -354,7 +360,7 @@ void GRAPH_OT_select_border(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/; /* rna */ - WM_operator_properties_gesture_border(ot, FALSE); + WM_operator_properties_gesture_border(ot, TRUE); ot->prop= RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", ""); RNA_def_boolean(ot->srna, "include_handles", 0, "Include Handles", "Are handles tested individually against the selection criteria"); -- cgit v1.2.3