diff options
author | Aleksandr Zinovev <roaoao@gmail.com> | 2017-08-08 15:52:14 +0300 |
---|---|---|
committer | Aleksandr Zinovev <roaoao@gmail.com> | 2017-08-08 15:52:14 +0300 |
commit | ed4707be470b61edef3a14c239838f91d8624269 (patch) | |
tree | 8e8740bb5bfa369e1b49d64d327304f9720eb8c1 /source/blender/editors/interface/interface_layout.c | |
parent | d85af2aa3f70ae3b95d10931323a916bfa1b8ebe (diff) |
Fix width estimation for empty layouts in pie menus
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |