[Bf-blender-cvs] [42e53147272] property-search-ui: Property Search: Support checkboxes with no headings

Hans Goudey noreply at git.blender.org
Wed Jul 1 21:10:48 CEST 2020


Commit: 42e53147272b76e25edc1e897810c650077ae792
Author: Hans Goudey
Date:   Wed Jul 1 15:10:40 2020 -0400
Branches: property-search-ui
https://developer.blender.org/rB42e53147272b76e25edc1e897810c650077ae792

Property Search: Support checkboxes with no headings

Further changes will be needed to keep track of the labels added
for headings.

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

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 f1c913d44ca..4ff4f23bd89 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -2152,7 +2152,7 @@ void uiItemFullR(uiLayout *layout,
     else {
       uiLayout *layout_split = uiLayoutSplit(
           layout_row ? layout_row : layout, UI_ITEM_PROP_SEP_DIVIDE, true);
-      bool label_added = false;
+      bool label_added = false; /* HANS-TODO: Replace with checking if label_but == NULL. */
       layout_split->space = 0;
       uiLayout *layout_sub = uiLayoutColumn(layout_split, true);
       layout_sub->space = 0;
@@ -2209,6 +2209,11 @@ void uiItemFullR(uiLayout *layout,
         label_added = true;
       }
 
+      /* Add an empty label button so the empty column isn't removed during property search. */
+      if (!label_added && !use_prop_sep_split_label) {
+        label_but = uiItemL_(layout_sub, "", ICON_NONE);
+      }
+
       layout_split = ui_item_prop_split_layout_hack(layout_parent, layout_split);
 
       /* Watch out! We can only write into the new layout now. */



More information about the Bf-blender-cvs mailing list