{
QStringList aModuleNames;
modules( aModuleNames, false ); // obtain a complete list of module names for the current configuration
- //! If there's the one and only module --> activate it automatically
- //! TODO: Possible improvement - default module can be taken from preferences
- return aModuleNames.count() > 1 ? QString( "" ) : ( aModuleNames.count() ? aModuleNames.first() : "" );
+
+ SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+ int sel = 0;
+ sel = resMgr->integerValue( "Activate", "def_module" );
+
+ return aModuleNames.count() > 1 && sel > 0 ? aModuleNames.at( sel - 1 ) : ( aModuleNames.count() ? aModuleNames.first() : "" );
}
/*!On new window slot.*/
saveDockWindowsState();
CAM_Application::onNewDoc();
-
- activateDefaultModule();
}
/*!
updateWindows();
updateViewManagers();
}
-
- activateDefaultModule();
}
/*!
}
return res;
-}
-
-void LightApp_Application::activateDefaultModule()
-{
- QString defModName("");
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- int sel = resMgr->integerValue( "Activate", "def_module" );
- if ( sel > 0 ) {
- LightApp_ModuleAction* moduleAction =
- qobject_cast<LightApp_ModuleAction*>( action( ModulesListId ) );
- if ( moduleAction && moduleAction->activeModule() == "" )
- {
- switch( sel ) {
- case 1: defModName = "CATHARE GUI"; break;
- case 2: defModName = "DIAGRAMS"; break;
- }
- activateModule( defModName );
- }
- }
}
\ No newline at end of file