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
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2012-11-09 17:33:23 +0400
committerTon Roosendaal <ton@blender.org>2012-11-09 17:33:23 +0400
commit079a0a30e49c036c1ce4425c949e0c370a91492b (patch)
tree63c71c71c2673c9017a85d9960e5297d429dcaaf /source
parentc046b13b56d80ec3888b64e9215f1fc35b68b9b3 (diff)
Usability:
Made SHIFT+drag mouse in Curve and ColorPicker widgets move with more precision. This was only working with UserPref "continuous grab".
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface_handlers.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 5d4427bcbef..5f01255b8e0 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -279,12 +279,7 @@ static int ui_is_a_warp_but(uiBut *but)
static float ui_mouse_scale_warp_factor(const short shift)
{
- if (U.uiflag & USER_CONTINUOUS_MOUSE) {
- return shift ? 0.05f : 1.0f;
- }
- else {
- return 1.0f;
- }
+ return shift ? 0.05f : 1.0f;
}
static void ui_mouse_scale_warp(uiHandleButtonData *data,
@@ -292,16 +287,11 @@ static void ui_mouse_scale_warp(uiHandleButtonData *data,
float *r_mx, float *r_my,
const short shift)
{
- if (U.uiflag & USER_CONTINUOUS_MOUSE) {
- const float fac = ui_mouse_scale_warp_factor(shift);
- /* slow down the mouse, this is fairly picky */
- *r_mx = (data->dragstartx * (1.0f - fac) + mx * fac);
- *r_my = (data->dragstarty * (1.0f - fac) + my * fac);
- }
- else {
- *r_mx = mx;
- *r_my = my;
- }
+ const float fac = ui_mouse_scale_warp_factor(shift);
+
+ /* slow down the mouse, this is fairly picky */
+ *r_mx = (data->dragstartx * (1.0f - fac) + mx * fac);
+ *r_my = (data->dragstarty * (1.0f - fac) + my * fac);
}
/* file selectors are exempt from utf-8 checks */