]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix for the Bug IPAL22178: Preferences for modules are not available in some cases
authorana <ana@opencascade.com>
Wed, 2 Feb 2011 13:30:01 +0000 (13:30 +0000)
committerana <ana@opencascade.com>
Wed, 2 Feb 2011 13:30:01 +0000 (13:30 +0000)
src/LightApp/LightApp_Application.cxx

index 2ba5cf62d3fb8556ea9700555d96914c4629cda3..e5978a66085056284de851b72cbfa2e404e73a2e 100644 (file)
@@ -1795,7 +1795,7 @@ LightApp_Preferences* LightApp_Application::preferences( const bool crt ) const
   connect( myPrefs, SIGNAL( preferenceChanged( QString&, QString&, QString& ) ),
            this, SLOT( onPreferenceChanged( QString&, QString&, QString& ) ) );
 
-  if ( !toCreate )
+  if ( !crt )
     return myPrefs;
 
   SUIT_ResourceMgr* resMgr = resourceMgr();
@@ -1815,7 +1815,7 @@ LightApp_Preferences* LightApp_Application::preferences( const bool crt ) const
 
     for ( QStringList::const_iterator it = modNameList.begin(); it != modNameList.end(); ++it )
     {
-      if ( !app->isLibExists( *it ) )
+      if ( !app->isLibExists( *it ) || _prefs_->hasModule( *it ) )
         continue;
 
       int modId = _prefs_->addPreference( *it );