]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix for bug IPAL19209 (Qt4 porting. Default Preferences are wrong. It seems that...
authormzn <mzn@opencascade.com>
Mon, 24 Mar 2008 07:56:40 +0000 (07:56 +0000)
committermzn <mzn@opencascade.com>
Mon, 24 Mar 2008 07:56:40 +0000 (07:56 +0000)
src/LightApp/LightApp_PreferencesDlg.cxx
src/LightApp/LightApp_PreferencesDlg.h

index f656689e011b3a800621a05bb1d4458ca5b4c183..6bda547366d1fbe55feb04577809a402e9fefa12 100644 (file)
@@ -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.*/
index 4c7f20f305ddc50d5a334e74b5c7b55db8bfd4de..40b5aff4fea8a7360353f5f2126a2f9d93f9577a 100644 (file)
@@ -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();