Tracker: don't initialize layouts when we're not supposed to.

This didn't cause any problems before because all the views that don't
use layouts reimplemented this function. But that may not be the case in
the future.
This commit is contained in:
Augustin Cavalier 2015-03-02 11:29:11 -05:00
parent 4a33b4e55c
commit 1dedefaf23
2 changed files with 3 additions and 1 deletions

View File

@ -461,6 +461,7 @@ BContainerWindow::BContainerWindow(LockingList<BWindow>* list,
:
BWindow(InitialWindowRect(feel), "TrackerWindow", look, feel, flags,
workspace),
fUseLayouts(useLayouts),
fMenuContainer(NULL),
fPoseContainer(NULL),
fBorderedView(NULL),
@ -1011,7 +1012,7 @@ BContainerWindow::RestoreState(const BMessage &message)
void
BContainerWindow::RestoreStateCommon()
{
if (!fIsDesktop)
if (!fIsDesktop && fUseLayouts)
InitLayout();
if (BootedInSafeMode())

View File

@ -280,6 +280,7 @@ protected:
BObjectList<Model>*, void*, BStringList&);
void LoadAddOn(BMessage*);
bool fUseLayouts;
BGroupLayout* fRootLayout;
BGroupView* fMenuContainer;
BGridView* fPoseContainer;