mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix: Geometry Nodes: empty expanded menu entries in modifier
Work around an issue with expanded menus that exists for a long time already. I briefly tried fixing it, but does not seem straight forward unfortunately without breaking stuff. Also see the comment in `ui_item_enum_expand_exec`.
This commit is contained in:
parent
2bc284975b
commit
fdfd1de9a8
1 changed files with 7 additions and 1 deletions
|
|
@ -2386,7 +2386,13 @@ static void draw_property_for_socket(DrawGroupInputsContext &ctx,
|
|||
}
|
||||
case SOCK_MENU: {
|
||||
if (socket.flag & NODE_INTERFACE_SOCKET_MENU_EXPANDED) {
|
||||
row->prop(ctx.md_ptr, rna_path, UI_ITEM_R_EXPAND, name, ICON_NONE);
|
||||
/* Use a single space when the name is empty to work around a bug with expanded enums. Also
|
||||
* see #ui_item_enum_expand_exec. */
|
||||
row->prop(ctx.md_ptr,
|
||||
rna_path,
|
||||
UI_ITEM_R_EXPAND,
|
||||
StringRef(name).is_empty() ? " " : name,
|
||||
ICON_NONE);
|
||||
}
|
||||
else {
|
||||
row->prop(ctx.md_ptr, rna_path, UI_ITEM_NONE, name, ICON_NONE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue