Fix T46401: bad step size w/ radians
authorCampbell Barton <ideasman42@gmail.com>
Wed, 7 Oct 2015 08:02:28 +0000 (19:02 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 7 Oct 2015 08:40:18 +0000 (19:40 +1100)
source/blender/editors/interface/interface_handlers.c

index 85b3f11c44effcb295970dbafe0768697e931023..97e38dea366c2472e05a1eeab38a9361df639f04 100644 (file)
@@ -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;
                        }
                }