From ffd06de470b0695adac70ada9ab3719bcd4d0e5f Mon Sep 17 00:00:00 2001 From: julianeisel Date: Tue, 6 Jan 2015 00:02:57 +0100 Subject: Correction to previous commit Just realized menu buttons are using hardmin and hardmax for a bad hack which will make the assert fail :/ --- source/blender/editors/interface/interface.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 50161863872..69ff1e78562 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -2603,10 +2603,6 @@ void ui_but_update(uiBut *but) } } - /* max must never be smaller than min! Both being equal is allowed though */ - BLI_assert(but->softmin <= but->softmax && - but->hardmin <= but->hardmax); - /* test for min and max, icon sliders, etc */ switch (but->type) { case UI_BTYPE_NUM: @@ -2615,9 +2611,13 @@ void ui_but_update(uiBut *but) UI_GET_BUT_VALUE_INIT(but, value); if (value < (double)but->hardmin) ui_but_value_set(but, but->hardmin); else if (value > (double)but->hardmax) ui_but_value_set(but, but->hardmax); + + /* max must never be smaller than min! Both being equal is allowed though */ + BLI_assert(but->softmin <= but->softmax && + but->hardmin <= but->hardmax); break; - case UI_BTYPE_ICON_TOGGLE: + case UI_BTYPE_ICON_TOGGLE: case UI_BTYPE_ICON_TOGGLE_N: if (!but->rnaprop || (RNA_property_flag(but->rnaprop) & PROP_ICONS_CONSECUTIVE)) { if (but->flag & UI_SELECT) but->iconadd = 1; -- cgit v1.2.3