From 44ace647a8ec0d112700afe0c394ec25257fc04f Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Fri, 30 Aug 2019 11:11:23 +0200 Subject: 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 --- source/blender/editors/animation/fmodifier_ui.c | 4 ++-- source/blender/editors/interface/interface_templates.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source') 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); -- cgit v1.2.3