From 6457a6517eaa53baeb531ce9995617c3caa7010e Mon Sep 17 00:00:00 2001 From: Alex Wilson Date: Tue, 1 May 2012 16:02:50 +1200 Subject: [PATCH] Fix bug from the removal of BALMLayoutBuilder::Snake. GCC considers the method chain one big function call, so pushes all parameters onto the stack before hand (something I discovered after quite a bit of debugging). In this case, layout->RightOf() returns NULL before the view is added, which caused the layout to become undefined. --- src/tests/libs/alm/Views.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tests/libs/alm/Views.cpp b/src/tests/libs/alm/Views.cpp index fc7d88afc0..0418cac792 100644 --- a/src/tests/libs/alm/Views.cpp +++ b/src/tests/libs/alm/Views.cpp @@ -71,7 +71,10 @@ public: layout->AddXTab()) .AddToRight(stringView1) .AddToRight(BSpaceLayoutItem::CreateGlue(), layout->Right()) - .AddBelow(statusBar, NULL, layout->Left(), layout->Right()) + .AddBelow(statusBar, NULL, layout->Left(), layout->Right()); + + // start over so that layout->RightOf() can return accurate results + BALM::BALMLayoutBuilder(layout) .StartingAt(statusBar) .AddBelow(menu2, layout->Bottom(), layout->Left(), layout->RightOf(menu1))