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:
authorDalai Felinto <dfelinto@gmail.com>2019-03-22 22:01:25 +0300
committerDalai Felinto <dfelinto@gmail.com>2019-03-22 22:03:38 +0300
commit243a9254ea579915e697cfde59e9c4f6e9ffd4ee (patch)
tree6b63133f201a71f7aa5559c19fb007491b11c761 /source/blender/editors/interface/interface_layout.c
parent74b47e4181d70284e125ff4c0012d9c1cc36487d (diff)
Fix warning for uninitialized icon_only
Warning/issue introduced on rBcaa357dae70322e.
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r--source/blender/editors/interface/interface_layout.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index e4f5c165aec..98e25e1b90f 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1599,9 +1599,11 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
is_array = RNA_property_array_check(prop);
len = (is_array) ? RNA_property_array_length(ptr, prop) : 0;
+ icon_only = (flag & UI_ITEM_R_ICON_ONLY) != 0;
+
/* set name and icon */
if (!name) {
- if ((flag & UI_ITEM_R_ICON_ONLY) == 0) {
+ if (!icon_only) {
name = RNA_property_ui_name(prop);
}
else {
@@ -1682,7 +1684,6 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
slider = (flag & UI_ITEM_R_SLIDER) != 0;
toggle = (flag & UI_ITEM_R_TOGGLE) != 0;
expand = (flag & UI_ITEM_R_EXPAND) != 0;
- icon_only = (flag & UI_ITEM_R_ICON_ONLY) != 0;
no_bg = (flag & UI_ITEM_R_NO_BG) != 0;
compact = (flag & UI_ITEM_R_COMPACT) != 0;