[Bf-blender-cvs] [962a0a6c661] master: Allow Building Without UI_PROP_DECORATE

Yevgeny Makarov noreply at git.blender.org
Thu Oct 29 16:16:43 CET 2020


Commit: 962a0a6c6614229d9e49b3b012bbee1dc9bb34b4
Author: Yevgeny Makarov
Date:   Thu Oct 29 07:56:43 2020 -0700
Branches: master
https://developer.blender.org/rB962a0a6c6614229d9e49b3b012bbee1dc9bb34b4

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

===================================================================

M	source/blender/editors/interface/interface_layout.c

===================================================================

diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index cf589e43858..efb29fe75c3 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -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);
     }



More information about the Bf-blender-cvs mailing list