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>2018-08-15 08:48:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-08-15 08:54:27 +0300
commitc3e3ccd42ccfcb6725f4d2d3b96afbf6339304a6 (patch)
tree097eab02bd50d884bbd54f96ec2b78fd02358950 /source/blender/editors
parenta9700e7ad276a82d7109c5ddf6deb490371429f0 (diff)
Cleanup: set expand variable for all enum-flags
No functional change, needed for fix in 2.8x
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_layout.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index e830d70e308..5fc2dd09203 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1438,6 +1438,10 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
}
}
+ if ((type == PROP_ENUM) && (RNA_property_flag(prop) & PROP_ENUM_FLAG)) {
+ flag |= UI_ITEM_R_EXPAND;
+ }
+
slider = (flag & UI_ITEM_R_SLIDER) != 0;
toggle = (flag & UI_ITEM_R_TOGGLE) != 0;
expand = (flag & UI_ITEM_R_EXPAND) != 0;
@@ -1463,8 +1467,9 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
uiDefButR_prop(block, UI_BTYPE_ROW, 0, name, 0, 0, w, h, ptr, prop, -1, 0, value, -1, -1, NULL);
}
/* expanded enum */
- else if (type == PROP_ENUM && (expand || RNA_property_flag(prop) & PROP_ENUM_FLAG))
+ else if (type == PROP_ENUM && expand) {
ui_item_enum_expand(layout, block, ptr, prop, name, h, icon_only);
+ }
/* property with separate label */
else if (type == PROP_ENUM || type == PROP_STRING || type == PROP_POINTER) {
but = ui_item_with_label(layout, block, name, icon, ptr, prop, index, 0, 0, w, h, flag);