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.
This commit is contained in:
@@ -71,7 +71,10 @@ public:
|
|||||||
layout->AddXTab())
|
layout->AddXTab())
|
||||||
.AddToRight(stringView1)
|
.AddToRight(stringView1)
|
||||||
.AddToRight(BSpaceLayoutItem::CreateGlue(), layout->Right())
|
.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)
|
.StartingAt(statusBar)
|
||||||
.AddBelow(menu2, layout->Bottom(), layout->Left(),
|
.AddBelow(menu2, layout->Bottom(), layout->Left(),
|
||||||
layout->RightOf(menu1))
|
layout->RightOf(menu1))
|
||||||
|
|||||||
Reference in New Issue
Block a user