Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-03-12 12:24:47 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-03-12 15:56:10 +0400
commite5e0888a8f024bdc2d3196055762050195bec7a9 (patch)
tree24d5ca5a43fa3e5de2b669c6cc183f72c4d40cd5 /source/blender/editors/interface/interface_utils.c
parenta7faad9aa11c5a8cab4497b7eb8345ce05a09814 (diff)
UI: allow passing "" for icon only enum buttons and still get an icon
Enum icon-only buttons were getting their strings set, then truncated with blenders string shortening methods, then not drawn because there was no room (since buttons are icon width). Modify UI code so icon-only buttons don't get names and passing "" to a button won't have its text set later on.
Diffstat (limited to 'source/blender/editors/interface/interface_utils.c')
-rw-r--r--source/blender/editors/interface/interface_utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index fc87801d6a3..261c666c33f 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -99,7 +99,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
else if (icon)
but = uiDefIconTextButR_prop(block, MENU, 0, icon, NULL, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
else
- but = uiDefButR_prop(block, MENU, 0, NULL, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+ but = uiDefButR_prop(block, MENU, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
break;
case PROP_STRING:
if (icon && name && name[0] == '\0')