From: mzn Date: Mon, 24 Mar 2008 07:56:40 +0000 (+0000) Subject: Fix for bug IPAL19209 (Qt4 porting. Default Preferences are wrong. It seems that... X-Git-Tag: V5_0_0a1~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=717d86b696d5645d7cb19d413a400dc511bd0767;p=modules%2Fgui.git Fix for bug IPAL19209 (Qt4 porting. Default Preferences are wrong. It seems that all fields have no values). --- diff --git a/src/LightApp/LightApp_PreferencesDlg.cxx b/src/LightApp/LightApp_PreferencesDlg.cxx index f656689e0..6bda54736 100644 --- a/src/LightApp/LightApp_PreferencesDlg.cxx +++ b/src/LightApp/LightApp_PreferencesDlg.cxx @@ -81,13 +81,15 @@ LightApp_PreferencesDlg::~LightApp_PreferencesDlg() myPrefs = 0; } -/*!Show dialog.*/ -void LightApp_PreferencesDlg::show() +/*!Show/hide dialog.*/ +void LightApp_PreferencesDlg::setVisible(bool visible) { - myPrefs->retrieve(); - myPrefs->toBackup(); - - QtxDialog::show(); + if ( visible ) { + myPrefs->retrieve(); + myPrefs->toBackup(); + } + + QtxDialog::setVisible(visible); } /*!Store preferences on accept.*/ diff --git a/src/LightApp/LightApp_PreferencesDlg.h b/src/LightApp/LightApp_PreferencesDlg.h index 4c7f20f30..40b5aff4f 100644 --- a/src/LightApp/LightApp_PreferencesDlg.h +++ b/src/LightApp/LightApp_PreferencesDlg.h @@ -40,7 +40,7 @@ public: LightApp_PreferencesDlg( LightApp_Preferences*, QWidget* = 0 ); virtual ~LightApp_PreferencesDlg(); - virtual void show(); + virtual void setVisible(bool visible); virtual void accept(); virtual void reject();