[Bf-blender-cvs] [0dcc4fd780e] temp-checkbox-layout-tweaks: Fix broken split layout for operator properties popups

Julian Eisel noreply at git.blender.org
Thu Apr 9 01:42:32 CEST 2020


Commit: 0dcc4fd780e82b7db3546aaa4d7020fc5f7b8272
Author: Julian Eisel
Date:   Thu Apr 9 01:40:37 2020 +0200
Branches: temp-checkbox-layout-tweaks
https://developer.blender.org/rB0dcc4fd780e82b7db3546aaa4d7020fc5f7b8272

Fix broken split layout for operator properties popups

Was creating multiple nested split layouts. `uiDefAutoButsRNA()` used to
do it's own layout splitting, that's redundant now, so I removed it.

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

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

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

diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index a69837e9b51..a3305cf08d5 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -293,7 +293,7 @@ eAutoPropButsReturn uiDefAutoButsRNA(uiLayout *layout,
                                      const bool compact)
 {
   eAutoPropButsReturn return_info = UI_PROP_BUTS_NONE_ADDED;
-  uiLayout *split, *col;
+  uiLayout *col;
   const char *name;
 
   RNA_STRUCT_BEGIN (ptr, prop) {
@@ -324,19 +324,11 @@ eAutoPropButsReturn uiDefAutoButsRNA(uiLayout *layout,
         }
         else {
           BLI_assert(label_align == UI_BUT_LABEL_ALIGN_SPLIT_COLUMN);
-          split = uiLayoutSplit(layout, 0.5f, false);
-
-          col = uiLayoutColumn(split, false);
-          uiItemL(col, (is_boolean) ? "" : name, ICON_NONE);
-          col = uiLayoutColumn(split, false);
+          col = uiLayoutColumn(layout, true);
+          /* Let uiItemFullR() create the split layout. */
+          uiLayoutSetPropSep(col, true);
         }
 
-        /* May need to add more cases here.
-         * don't override enum flag names */
-
-        /* name is shown above, empty name for button below */
-        name = (flag & PROP_ENUM_FLAG || is_boolean) ? NULL : "";
-
         break;
       }
       case UI_BUT_LABEL_ALIGN_NONE:



More information about the Bf-blender-cvs mailing list