UI: show check-boxes pie-menu bool/enums
This commit is contained in:
parent
29e19cecd8
commit
4132ca1ac2
Notes:
blender-bot
2023-11-20 12:14:32 +01:00
Referenced by issue #43649, Regression: Geometry Node Breaks Viewport Shading
|
@ -1236,7 +1236,8 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
|
|||
name = ui_item_name_add_colon(name, namestr);
|
||||
}
|
||||
|
||||
if (layout->root->type == UI_LAYOUT_MENU) {
|
||||
/* menus and pie-menus don't show checkbox without this */
|
||||
if (ELEM(layout->root->type, UI_LAYOUT_MENU, UI_LAYOUT_PIEMENU)) {
|
||||
if (type == PROP_BOOLEAN && ((is_array == false) || (index != RNA_NO_INDEX))) {
|
||||
if (is_array) icon = (RNA_property_boolean_get_index(ptr, prop, index)) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT;
|
||||
else icon = (RNA_property_boolean_get(ptr, prop)) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT;
|
||||
|
|
Loading…
Reference in New Issue