Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r--source/blender/editors/interface/interface_layout.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index f5061dbf0af..1e94824a9f9 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1971,17 +1971,15 @@ static void ui_litem_layout_split(uiLayout *litem)
uiLayoutItemSplt *split= (uiLayoutItemSplt*)litem;
uiItem *item;
float percentage;
- int itemh, x, y, w, tot=0, colw=0;
+ const int tot= BLI_countlist(&litem->items);
+ int itemh, x, y, w, colw=0;
+
+ if(tot == 0)
+ return;
x= litem->x;
y= litem->y;
- for(item=litem->items.first; item; item=item->next)
- tot++;
-
- if(tot == 0)
- return;
-
percentage= (split->percentage == 0.0f)? 1.0f/(float)tot: split->percentage;
w= (litem->w - (tot-1)*litem->space);