Fix #135601: prop_tabs_enum No Longer Displays Text of Enum
Caused by 21aef81714
Now, pass along `uiname` as `std::optional<StringRef>` early on (and use
`std::nullopt`).
Without this, the `(!uiname || !uiname->is_empty())` condition in
`ui_item_enum_expand_elem_exec` wont be true, resulting in the empty
label.
Pull Request: https://projects.blender.org/blender/blender/pulls/135621
This commit is contained in:
committed by
Philipp Oeser
parent
62fcd012cf
commit
a568890515
@@ -942,7 +942,7 @@ static void ui_item_enum_expand_tabs(uiLayout *layout,
|
||||
PropertyRNA *prop,
|
||||
PointerRNA *ptr_highlight,
|
||||
PropertyRNA *prop_highlight,
|
||||
const char *uiname,
|
||||
const std::optional<StringRef> uiname,
|
||||
const int h,
|
||||
const bool icon_only)
|
||||
{
|
||||
@@ -3715,8 +3715,16 @@ void uiItemTabsEnumR_prop(uiLayout *layout,
|
||||
uiBlock *block = layout->root->block;
|
||||
|
||||
UI_block_layout_set_current(block, layout);
|
||||
ui_item_enum_expand_tabs(
|
||||
layout, C, block, ptr, prop, ptr_highlight, prop_highlight, nullptr, UI_UNIT_Y, icon_only);
|
||||
ui_item_enum_expand_tabs(layout,
|
||||
C,
|
||||
block,
|
||||
ptr,
|
||||
prop,
|
||||
ptr_highlight,
|
||||
prop_highlight,
|
||||
std::nullopt,
|
||||
UI_UNIT_Y,
|
||||
icon_only);
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
Reference in New Issue
Block a user