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/physics | |
parent | 2338765726a5aa6b8870d573d685218720864583 (diff) |
use event->mval rather then subtracting ar->winrct.x / y from event->x / y
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index f4f66c17459..8c3a5c46c04 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -1505,13 +1505,7 @@ static int select_linked_exec(bContext *C, wmOperator *op) static int select_linked_invoke(bContext *C, wmOperator *op, wmEvent *event) { - ARegion *ar= CTX_wm_region(C); - int location[2]; - - location[0]= event->x - ar->winrct.xmin; - location[1]= event->y - ar->winrct.ymin; - RNA_int_set_array(op->ptr, "location", location); - + RNA_int_set_array(op->ptr, "location", event->mval); return select_linked_exec(C, op); } @@ -3682,12 +3676,10 @@ static int brush_edit_exec(bContext *C, wmOperator *op) static void brush_edit_apply_event(bContext *C, wmOperator *op, wmEvent *event) { - ARegion *ar= CTX_wm_region(C); PointerRNA itemptr; float mouse[2]; - mouse[0]= event->x - ar->winrct.xmin; - mouse[1]= event->y - ar->winrct.ymin; + VECCOPY2D(mouse, event->mval); /* fill in stroke */ RNA_collection_add(op->ptr, "stroke", &itemptr); |