From: stv Date: Fri, 5 Dec 2008 09:34:54 +0000 (+0000) Subject: Bug fix for IPAL20739 X-Git-Tag: V5_1_0rc2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ccb1d797785dde195242e3e36a46b92316d2bf4c;p=modules%2Fgui.git Bug fix for IPAL20739 --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 98d180624..9f606e478 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -1693,7 +1693,7 @@ LightApp_Preferences* LightApp_Application::preferences( const bool crt ) const LightApp_Application* that = (LightApp_Application*)this; bool toCreate = !_prefs_ && crt; - if( toCreate ) + if ( toCreate ) { _prefs_ = new LightApp_Preferences( resourceMgr() ); that->createPreferences( _prefs_ ); @@ -1701,6 +1701,9 @@ LightApp_Preferences* LightApp_Application::preferences( const bool crt ) const that->myPrefs = _prefs_; + if ( !toCreate ) + return myPrefs; + SUIT_ResourceMgr* resMgr = resourceMgr(); QList appList = SUIT_Session::session()->applications(); @@ -1740,8 +1743,7 @@ LightApp_Preferences* LightApp_Application::preferences( const bool crt ) const if ( mod && !_prefs_->hasModule( mod->moduleName() ) ) { _prefs_->addPreference( mod->moduleName() ); - if( toCreate ) - mod->createPreferences(); + mod->createPreferences(); that->emptyPreferences( mod->moduleName() ); } } @@ -1779,6 +1781,8 @@ void LightApp_Application::emptyPreferences( const QString& modName ) if ( !item || !item->isEmpty() ) return; + printf( "---------------------> Modify for empty module.\n" ); + QtxPagePrefFrameItem* frm = new QtxPagePrefFrameItem( item->title(), item->parentItem() ); frm->setIcon( item->icon() ); frm->setStretch( false );