diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-10-28 13:16:49 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-10-28 13:16:49 +0300 |
commit | e694e307211a084c3f01b8554b9c9b2abaddb014 (patch) | |
tree | a281755a5e222f9ffb33af719532ba7271e95f61 /source/blender/editors/interface/interface_utils.c | |
parent | 8510723cf4577e916a26bb2ee5b4fd545fac505e (diff) |
UI Icon Toggles Fix:
Boolean settings now use TOG instead of ICONTOG when they have icons, since ICONTOG was causing too much trouble with icons changing when they shouldn't be. Perhaps in future there should be some flag for specifying from RNA/UI-Layouts which one you want, but for now, this will do.
Reverting r23936 since that fix depended on ICONTOG behaviour.
Diffstat (limited to 'source/blender/editors/interface/interface_utils.c')
-rw-r--r-- | source/blender/editors/interface/interface_utils.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index 5ac3b2f4db3..f24ae62db8f 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -61,11 +61,12 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind value= RNA_property_boolean_get_index(ptr, prop, index); else value= RNA_property_boolean_get(ptr, prop); - + + // XXX: when to do TOG, and when to do ICONTOG? for now, let's just do TOG, since ICONTOG causes too much trouble everywhere else if(icon && name && strcmp(name, "") == 0) - but= uiDefIconButR(block, ICONTOG, 0, icon, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); + but= uiDefIconButR(block, TOG, 0, icon, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); else if(icon) - but= uiDefIconTextButR(block, ICONTOG, 0, icon, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); + but= uiDefIconTextButR(block, TOG, 0, icon, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); else but= uiDefButR(block, OPTION, 0, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); break; |