Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/animation/anim_channels_edit.c')
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 4edcca46935..9145cc2b79d 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -1881,6 +1881,7 @@ static void ANIM_OT_channels_select_border(wmOperatorType *ot)
ot->invoke= WM_border_select_invoke;
ot->exec= animchannels_borderselect_exec;
ot->modal= WM_border_select_modal;
+ ot->cancel= WM_border_select_cancel;
ot->poll= animedit_poll_channels_nla_tweakmode_off;
@@ -2148,7 +2149,7 @@ static int animchannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *
bAnimContext ac;
ARegion *ar;
View2D *v2d;
- int mval[2], channel_index;
+ int channel_index;
int notifierFlags = 0;
short selectmode;
float x, y;
@@ -2162,10 +2163,6 @@ static int animchannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *
ar= ac.ar;
v2d= &ar->v2d;
- /* get mouse coordinates (in region coordinates) */
- mval[0]= (event->x - ar->winrct.xmin);
- mval[1]= (event->y - ar->winrct.ymin);
-
/* select mode is either replace (deselect all, then add) or add/extend */
if (RNA_boolean_get(op->ptr, "extend"))
selectmode= SELECT_INVERT;
@@ -2179,7 +2176,7 @@ static int animchannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *
* so that the tops of channels get caught ok. Since ACHANNEL_FIRST is really ACHANNEL_HEIGHT, we simply use
* ACHANNEL_HEIGHT_HALF.
*/
- UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, &y);
+ UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, &y);
UI_view2d_listview_view_to_cell(v2d, ACHANNEL_NAMEWIDTH, ACHANNEL_STEP, 0, (float)ACHANNEL_HEIGHT_HALF, x, y, NULL, &channel_index);
/* handle mouse-click in the relevant channel then */