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:
authorJoshua Leung <aligorith@gmail.com>2009-09-13 07:30:51 +0400
committerJoshua Leung <aligorith@gmail.com>2009-09-13 07:30:51 +0400
commit82a7b73d5aa4706d77028663ab35c0180d508751 (patch)
tree8a88be93b33229933aef57834970b13fd889b41f /source/blender/makesrna/intern/rna_ui_api.c
parent896ada37ac2d9913f514a772b8e2356bac2b32ab (diff)
2.5 - UI Bugfixes
* Loading newly saved files (where linked-libs were used) crashed. However, libraries still don't get loaded correctly yet for some reason... * Pointer layout-items now draw without their UI text if their name is set to "" (i.e. text=""), making the ones with icons appear normal. This is kindof a hack, since it would be better to expose icon_only, but this way is less work.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index 20948843f8a..ab2dfe5e33c 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -44,6 +44,9 @@ static void rna_uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr,
flag |= (slider)? UI_ITEM_R_SLIDER: 0;
flag |= (expand)? UI_ITEM_R_EXPAND: 0;
flag |= (toggle)? UI_ITEM_R_TOGGLE: 0;
+
+ // XXX: an 'icon_only' prop should be added instead, but for now, this makes ptrs look ok
+ flag |= (name && name[0]==0)? UI_ITEM_R_ICON_ONLY: 0;
uiItemR(layout, name, icon, ptr, propname, flag);
}