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
+2 -1
View File
@@ -461,6 +461,7 @@ BContainerWindow::BContainerWindow(LockingList<BWindow>* list,
: :
BWindow(InitialWindowRect(feel), "TrackerWindow", look, feel, flags, BWindow(InitialWindowRect(feel), "TrackerWindow", look, feel, flags,
workspace), workspace),
fUseLayouts(useLayouts),
fMenuContainer(NULL), fMenuContainer(NULL),
fPoseContainer(NULL), fPoseContainer(NULL),
fBorderedView(NULL), fBorderedView(NULL),
@@ -1011,7 +1012,7 @@ BContainerWindow::RestoreState(const BMessage &message)
void void
BContainerWindow::RestoreStateCommon() BContainerWindow::RestoreStateCommon()
{ {
if (!fIsDesktop) if (!fIsDesktop && fUseLayouts)
InitLayout(); InitLayout();
if (BootedInSafeMode()) if (BootedInSafeMode())
+1
View File
@@ -280,6 +280,7 @@ protected:
BObjectList<Model>*, void*, BStringList&); BObjectList<Model>*, void*, BStringList&);
void LoadAddOn(BMessage*); void LoadAddOn(BMessage*);
bool fUseLayouts;
BGroupLayout* fRootLayout; BGroupLayout* fRootLayout;
BGroupView* fMenuContainer; BGroupView* fMenuContainer;
BGridView* fPoseContainer; BGridView* fPoseContainer;