]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
PAL9788 - two copy of preferences if activate two studies with SMESH (for example...
authorasl <asl@opencascade.com>
Tue, 13 Dec 2005 07:34:45 +0000 (07:34 +0000)
committerasl <asl@opencascade.com>
Tue, 13 Dec 2005 07:34:45 +0000 (07:34 +0000)
src/LightApp/LightApp_Application.cxx

index b630aed9d1d4bb91a87d985310cd8dd81766b568..ba573af81decb3128d5d2abe651009e0248a515d 100644 (file)
@@ -1385,7 +1385,8 @@ LightApp_Preferences* LightApp_Application::preferences( const bool crt ) const
 
   LightApp_Application* that = (LightApp_Application*)this;
 
-  if ( !_prefs_ && crt )
+  bool toCreate = !_prefs_ && crt;
+  if( toCreate )
   {
     _prefs_ = new LightApp_Preferences( resourceMgr() );
     that->createPreferences( _prefs_ );
@@ -1421,7 +1422,8 @@ LightApp_Preferences* LightApp_Application::preferences( const bool crt ) const
       {
        int modCat = _prefs_->addPreference( mod->moduleName() );
        _prefs_->setItemProperty( modCat, "info", QString::null );
-       mod->createPreferences();
+       if( toCreate )
+         mod->createPreferences();
       }
     }
   }