Allow Building Without UI_PROP_DECORATE
Allow project to build without definition of optional UI_PROP_DECORATE. Differential Revision: https://developer.blender.org/D8370 Reviewed by Julian Eisel
This commit is contained in:
parent
f75b09e7e6
commit
962a0a6c66
|
@ -964,7 +964,11 @@ static uiBut *ui_item_with_label(uiLayout *layout,
|
|||
UI_block_layout_set_current(block, layout);
|
||||
|
||||
/* Only add new row if more than 1 item will be added. */
|
||||
if (name[0] || use_prop_decorate) {
|
||||
if (name[0]
|
||||
#ifdef UI_PROP_DECORATE
|
||||
|| use_prop_decorate
|
||||
#endif
|
||||
) {
|
||||
/* Also avoid setting 'align' if possible. Set the space to zero instead as aligning a large
|
||||
* number of labels can end up aligning thousands of buttons when displaying key-map search (a
|
||||
* heavy operation), see: T78636. */
|
||||
|
@ -972,8 +976,8 @@ static uiBut *ui_item_with_label(uiLayout *layout,
|
|||
sub->space = 0;
|
||||
}
|
||||
|
||||
#ifdef UI_PROP_DECORATE
|
||||
if (name[0]) {
|
||||
#ifdef UI_PROP_DECORATE
|
||||
if (use_prop_sep) {
|
||||
layout_prop_decorate = uiItemL_respect_property_split(layout, name, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue