From a9456a6e0ca9f9d9503c243e96af5665eae0f32a Mon Sep 17 00:00:00 2001 From: asl Date: Tue, 13 Dec 2005 07:34:45 +0000 Subject: [PATCH] PAL9788 - two copy of preferences if activate two studies with SMESH (for example) and after call preferences dialog --- src/LightApp/LightApp_Application.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index b630aed9d..ba573af81 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -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(); } } } -- 2.39.2