From 717d86b696d5645d7cb19d413a400dc511bd0767 Mon Sep 17 00:00:00 2001 From: mzn Date: Mon, 24 Mar 2008 07:56:40 +0000 Subject: [PATCH] Fix for bug IPAL19209 (Qt4 porting. Default Preferences are wrong. It seems that all fields have no values). --- src/LightApp/LightApp_PreferencesDlg.cxx | 14 ++++++++------ src/LightApp/LightApp_PreferencesDlg.h | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) 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(); -- 2.39.2