Fix restoring of stacked windows.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39535 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9ff327dea3
commit
2aa6775158
@ -854,20 +854,21 @@ SATGroup::RestoreGroup(const BMessage& archive, StackAndTile* sat)
|
||||
|
||||
// adding windows to area
|
||||
uint64 windowId;
|
||||
WindowArea* area = NULL;
|
||||
SATWindow* prevWindow = NULL;
|
||||
for (int32 i = 0; areaArchive.FindInt64("window", i,
|
||||
(int64*)&windowId) == B_OK; i++) {
|
||||
SATWindow* window = sat->FindSATWindow(windowId);
|
||||
if (!window)
|
||||
continue;
|
||||
|
||||
if (area == NULL) {
|
||||
if (prevWindow == NULL) {
|
||||
if (!group->AddWindow(window, left, top, right, bottom))
|
||||
return B_ERROR;
|
||||
area = window->GetWindowArea();
|
||||
continue;
|
||||
prevWindow = window;
|
||||
} else {
|
||||
if (!group->AddWindow(window, area))
|
||||
return B_ERROR;
|
||||
if (!prevWindow->StackWindow(window))
|
||||
continue;
|
||||
prevWindow = window;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user