From 1f48dad4b60e00cba5b3bb6c2519ee7c1b73afec Mon Sep 17 00:00:00 2001 From: mzn Date: Thu, 16 Feb 2006 14:42:03 +0000 Subject: [PATCH] Fix for bug PAL11561 ( Salome 3 window is always maximized ). --- src/LightApp/LightApp_Application.cxx | 21 +++++++++++++-------- src/LightApp/LightApp_Application.h | 1 + 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 0ebc91d89..c63f918bc 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -181,14 +181,6 @@ myPrefs( 0 ) */ LightApp_Application::~LightApp_Application() { - saveWindowsGeometry(); - - if ( resourceMgr() ) - { - if ( desktop() ) - desktop()->saveGeometry( resourceMgr(), "desktop" ); - resourceMgr()->save(); - } delete mySelMgr; } @@ -1704,6 +1696,19 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString } } +/*!Save preferences */ +void LightApp_Application::savePreferences() +{ + saveWindowsGeometry(); + + if ( resourceMgr() ) + { + if ( desktop() ) + desktop()->saveGeometry( resourceMgr(), "desktop" ); + resourceMgr()->save(); + } +} + /*!Update desktop title.*/ void LightApp_Application::updateDesktopTitle() { QString aTitle = applicationName(); diff --git a/src/LightApp/LightApp_Application.h b/src/LightApp/LightApp_Application.h index 14d2e4c23..6af7ef767 100644 --- a/src/LightApp/LightApp_Application.h +++ b/src/LightApp/LightApp_Application.h @@ -128,6 +128,7 @@ protected: LightApp_Preferences* preferences( const bool ) const; virtual void createPreferences( LightApp_Preferences* ); virtual void preferencesChanged( const QString&, const QString& ); + virtual void savePreferences(); virtual void updateDesktopTitle(); protected slots: -- 2.39.2