diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-20 11:40:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-20 11:40:05 +0400 |
commit | 9f766c71b0a98801600c775dfc46faee84ddf49e (patch) | |
tree | e8d933e20df512eb836062e0f8cf9191f32c1141 /source/blender/editors/space_sequencer/sequencer_add.c | |
parent | 2338765726a5aa6b8870d573d685218720864583 (diff) |
use event->mval rather then subtracting ar->winrct.x / y from event->x / y
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_add.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_add.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index ad0d0048388..6d50913dfd4 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -117,17 +117,11 @@ static void sequencer_generic_invoke_path__internal(bContext *C, wmOperator *op, static void sequencer_generic_invoke_xy__internal(bContext *C, wmOperator *op, wmEvent *event, int flag) { - ARegion *ar= CTX_wm_region(C); View2D *v2d= UI_view2d_fromcontext(C); - int mval[2]; float mval_v2d[2]; - - mval[0]= event->x - ar->winrct.xmin; - mval[1]= event->y - ar->winrct.ymin; - - UI_view2d_region_to_view(v2d, mval[0], mval[1], &mval_v2d[0], &mval_v2d[1]); + UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &mval_v2d[0], &mval_v2d[1]); RNA_int_set(op->ptr, "channel", (int)mval_v2d[1]+0.5f); RNA_int_set(op->ptr, "frame_start", (int)mval_v2d[0]); |