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:
Yevgeny Makarov 2020-10-29 07:56:43 -07:00 committed by Harley Acheson
parent f75b09e7e6
commit 962a0a6c66
1 changed files with 6 additions and 2 deletions

View File

@ -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);
}