* Fixed #4339 - I did not use stimut's patch (but thanks a lot, I wouldn't even
have started looking into it without it!), but solved it a bit differently by moving the state saving into the destructor, and removing the tab in question manually afterwards. * Automatic whitespace cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35727 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2007, Haiku.
|
||||
* Copyright 2003-2010, Haiku.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
@@ -308,6 +308,7 @@ ModulesView::~ModulesView()
|
||||
void
|
||||
ModulesView::DetachedFromWindow()
|
||||
{
|
||||
SaveState();
|
||||
_CloseSaver();
|
||||
}
|
||||
|
||||
@@ -639,6 +640,14 @@ ScreenSaverWindow::ScreenSaverWindow()
|
||||
|
||||
ScreenSaverWindow::~ScreenSaverWindow()
|
||||
{
|
||||
Hide();
|
||||
_UpdateStatus();
|
||||
|
||||
delete fTabView->RemoveTab(1);
|
||||
// We delete this here in order to make sure the module view saves its
|
||||
// state while the window is still intact.
|
||||
|
||||
fSettings.Save();
|
||||
}
|
||||
|
||||
|
||||
@@ -917,10 +926,6 @@ ScreenSaverWindow::ScreenChanged(BRect frame, color_space colorSpace)
|
||||
bool
|
||||
ScreenSaverWindow::QuitRequested()
|
||||
{
|
||||
_UpdateStatus();
|
||||
fModulesView->SaveState();
|
||||
fSettings.Save();
|
||||
|
||||
be_app->PostMessage(B_QUIT_REQUESTED);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user