[Bf-blender-cvs] [44ace647a8e] master: Fix interger number buttons increment/decrement arrows not working in some cases

Philipp Oeser noreply at git.blender.org
Fri Aug 30 12:47:38 CEST 2019


Commit: 44ace647a8ec0d112700afe0c394ec25257fc04f
Author: Philipp Oeser
Date:   Fri Aug 30 11:11:23 2019 +0200
Branches: master
https://developer.blender.org/rB44ace647a8ec0d112700afe0c394ec25257fc04f

Fix interger number buttons increment/decrement arrows not working in
some cases

Since rB78b56fa7d973 defining a button with 'but->a1 = 0' wasnt
automatically setting its step value to 1 in 'ui_do_but_NUM' anymore.
Instead of handling this more forgiving in 'ui_do_but_NUM', went over
the remaining cases of buttons and and defined them with a step value of
1.

Fixes T69305

Reviewed By: brecht

Maniphest Tasks: T69305

Differential Revision: https://developer.blender.org/D5631

===================================================================

M	source/blender/editors/animation/fmodifier_ui.c
M	source/blender/editors/interface/interface_templates.c

===================================================================

diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index b42e8102c5b..705351522f8 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -197,7 +197,7 @@ static void draw_modifier__generator(uiLayout *layout,
           &data->poly_order,
           1,
           100,
-          0,
+          1,
           0,
           TIP_("'Order' of the Polynomial (for a polynomial with n terms, 'order' is n-1)"));
       UI_but_func_set(but, validate_fmodifier_cb, fcm, fcurve_owner_id);
@@ -335,7 +335,7 @@ static void draw_modifier__generator(uiLayout *layout,
           &data->poly_order,
           1,
           100,
-          0,
+          1,
           0,
           TIP_("'Order' of the Polynomial (for a polynomial with n terms, 'order' is n-1)"));
       UI_but_func_set(but, validate_fmodifier_cb, fcm, fcurve_owner_id);
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index e2f6355e0f5..f53bef877c4 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -3207,7 +3207,7 @@ static void colorband_buttons_layout(uiLayout *layout,
                 &coba->cur,
                 0.0,
                 (float)(MAX2(0, coba->tot - 1)),
-                0,
+                1,
                 0,
                 TIP_("Choose active color stop"));
       row = uiLayoutRow(split, false);
@@ -3237,7 +3237,7 @@ static void colorband_buttons_layout(uiLayout *layout,
                 &coba->cur,
                 0.0,
                 (float)(MAX2(0, coba->tot - 1)),
-                0,
+                1,
                 0,
                 TIP_("Choose active color stop"));
       row = uiLayoutRow(subsplit, false);



More information about the Bf-blender-cvs mailing list