[Bf-blender-cvs] [ffd06de] master: Correction to previous commit
julianeisel
noreply at git.blender.org
Tue Jan 6 00:07:24 CET 2015
Commit: ffd06de470b0695adac70ada9ab3719bcd4d0e5f
Author: julianeisel
Date: Tue Jan 6 00:02:57 2015 +0100
Branches: master
https://developer.blender.org/rBffd06de470b0695adac70ada9ab3719bcd4d0e5f
Correction to previous commit
Just realized menu buttons are using hardmin and hardmax for a bad hack which will make the assert fail :/
===================================================================
M source/blender/editors/interface/interface.c
===================================================================
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 5016186..69ff1e7 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;
More information about the Bf-blender-cvs
mailing list