diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-10-07 11:02:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-10-07 11:40:18 +0300 |
commit | 0e290d75fc7bb1f5c9efc5ed644278a885bf4192 (patch) | |
tree | 44edd3418a6f4baced6dea96ccfc6598b0d1d28f | |
parent | 0d36233dd81c92d98b2e665d04a8034e7b27aba0 (diff) |
Fix T46401: bad step size w/ radians
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 85b3f11c44e..97e38dea366 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -3962,8 +3962,12 @@ static float ui_numedit_apply_snapf( /* snapping by 10's for float buttons is quite annoying (location, scale...), * but allow for rotations */ if (softrange >= 21.0f) { + UnitSettings *unit = but->block->unit; int unit_type = UI_but_unit_type_get(but); - if (!ELEM(unit_type, PROP_UNIT_ROTATION)) { + if ((unit_type == PROP_UNIT_ROTATION) && (unit->system_rotation != USER_UNIT_ROT_RADIANS)) { + /* pass (degrees)*/ + } + else { softrange = 20.0f; } } |