Commit: ed4707be470b61edef3a14c239838f91d8624269
Author: Aleksandr Zinovev
Date:   Tue Aug 8 15:52:14 2017 +0300
Branches: master
https://developer.blender.org/rBed4707be470b61edef3a14c239838f91d8624269

Fix width estimation for empty layouts in pie menus

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

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 c57faf97188..dc2b97acf65 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -3137,8 +3137,11 @@ static void ui_item_estimate(uiItem *item)
                for (subitem = litem->items.first; subitem; subitem = 
subitem->next)
                        ui_item_estimate(subitem);
 
-               if (BLI_listbase_is_empty(&litem->items))
+               if (BLI_listbase_is_empty(&litem->items)) {
+                       litem->w = 0;
+                       litem->h = 0;
                        return;
+               }
 
                if (litem->scale[0] != 0.0f || litem->scale[1] != 0.0f)
                        ui_item_scale(litem, litem->scale);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to