[Bf-blender-cvs] [ac08819] master: Fix T37383: wrong spacing on Add menu in 3D view header.

Brecht Van Lommel noreply at git.blender.org
Wed Nov 27 05:25:34 CET 2013


Commit: ac088192d4fd574709e25c78d047f308e74e9423
Author: Brecht Van Lommel
Date:   Wed Nov 27 05:23:02 2013 +0100
http://developer.blender.org/rBac088192d4fd574709e25c78d047f308e74e9423

Fix T37383: wrong spacing on Add menu in 3D view header.

This also was in the info header but less obvious, mistake in the layout engine.

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

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 3cd022b..8506899 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1881,7 +1881,7 @@ static int ui_litem_min_width(int itemw)
 static void ui_litem_layout_row(uiLayout *litem)
 {
 	uiItem *item;
-	int x, y, w, tot, totw, neww, itemw, minw, itemh, offset;
+	int x, y, w, tot, totw, neww, newtotw, itemw, minw, itemh, offset;
 	int fixedw, freew, fixedx, freex, flag = 0, lastw = 0;
 
 	/* x = litem->x; */ /* UNUSED */
@@ -1908,6 +1908,7 @@ static void ui_litem_layout_row(uiLayout *litem)
 		freew = 0;
 		x = 0;
 		flag = 0;
+		newtotw = totw;
 
 		for (item = litem->items.first; item; item = item->next) {
 			if (item->flag)
@@ -1928,7 +1929,7 @@ static void ui_litem_layout_row(uiLayout *litem)
 				item->flag = 1;
 				fixedw += minw;
 				flag = 1;
-				totw -= itemw;
+				newtotw -= itemw;
 			}
 			else {
 				/* keep free size */
@@ -1937,6 +1938,7 @@ static void ui_litem_layout_row(uiLayout *litem)
 			}
 		}
 
+		totw = newtotw;
 		lastw = fixedw;
 	} while (flag);




More information about the Bf-blender-cvs mailing list