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-01-30 08:28:39 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-01-30 08:28:39 +0400
commit9598990b9b6ef4fb129943ea1288d9087dff9f9b (patch)
treee4f1bf1dd4e4dce37d458e66c26b565d1b846c7e /source/blender/editors/interface
parentb3bb50f6879d57f4cfd531401b58da671b986d6e (diff)
UI API: don't use a text label when icon_only is set
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_layout.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index d2099334efb..e10baa35d0d 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -728,7 +728,7 @@ PointerRNA uiItemFullO_ptr(uiLayout *layout, wmOperatorType *ot, const char *nam
int w;
if (!name) {
- if (ot && ot->srna)
+ if (ot && ot->srna && (flag & UI_ITEM_R_ICON_ONLY) == 0)
name = RNA_struct_ui_name(ot->srna);
else
name = "";
@@ -1159,8 +1159,15 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
len = (is_array) ? RNA_property_array_length(ptr, prop) : 0;
/* set name and icon */
- if (!name)
- name = RNA_property_ui_name(prop);
+ if (!name) {
+ if ((flag & UI_ITEM_R_ICON_ONLY) == 0) {
+ name = RNA_property_ui_name(prop);
+ }
+ else {
+ name = "";
+ }
+ }
+
if (icon == ICON_NONE)
icon = RNA_property_ui_icon(prop);