QString res;
for ( ModuleInfoList::const_iterator it = myInfoList.begin(); it != myInfoList.end() && res.isEmpty(); ++it )
{
- if ( (*it).title == title )
- res = (*it).internal;
+ ModuleInfo anInfo = *it;
+ if ( anInfo.title == title )
+ res = anInfo.internal;
}
if ( !res.isEmpty() && full )
res = SUIT_Tools::library( res );
break;
}
+ if ( args.indexOf( "--autoload" ) != -1 )
+ myAutoLoad = true;
+
modList.clear();
QStringList mods = modules.split( QRegExp( "[:|,\\s]" ), QString::SkipEmptyParts );
for ( int i = 0; i < mods.count(); i++ ) {
/*SUIT_Study* study = */activeStudy();
STD_Application::createEmptyStudy();
}
+
+/*!
+ \brief Gets value of myAutoLoad flag
+*/
+bool CAM_Application::autoLoad() const
+{
+ return myAutoLoad;
+}
if ( objectBrowser() )
objectBrowser()->setRoot( aRoot );
- activateModule( defaultModule() );
+ QString aDefModule = defaultModule();
+
+ if ( autoLoad() )
+ {
+ LightApp_Application* anApp = this;
+ CAM_Application::ModuleList aModules = anApp->modules();
+ CAM_Application::ModuleList::iterator anIter;
+ for ( anIter = aModules.begin(); anIter != aModules.end(); ++anIter )
+ {
+ CAM_Module* aModule = *anIter;
+ if ( aModule && aModule->name() != aDefModule )
+ aModule->connectToStudy( (LightApp_Study*)theStudy );
+ }
+ }
+
+ activateModule( aDefModule );
if ( objectBrowser() )
objectBrowser()->openLevels();