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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-06-09 17:31:27 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-06-09 17:31:27 +0400
commitf1f33ba7be2d6c1c1f79c1f833543948f9b3bb79 (patch)
tree9a7ba15a3a45699d88e266cbd39a3e5fc90aff88
parent0ae8ce3ab1d8295266c8cda60f3446249b4416ab (diff)
Fix T40549: box selection starting point in the file requester.
We need to 'reset' mouse coordinates to the one it was when the gesture handling started, else org coords are where the tweak event is created, which gives a noticeable gap (several pixels) and unwanted behavior like the one retported about file box selection.
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index a73532680c5..13245e936f9 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -3241,6 +3241,9 @@ static void tweak_gesture_modal(bContext *C, const wmEvent *event)
wmEvent tevent;
wm_event_init_from_window(window, &tevent);
+ /* We want to get coord from start of drag, not from point where it becomes a tweak event, see T40549 */
+ tevent.x = rect->xmin + sx;
+ tevent.y = rect->ymin + sy;
if (gesture->event_type == LEFTMOUSE)
tevent.type = EVT_TWEAK_L;
else if (gesture->event_type == RIGHTMOUSE)