bool res = false;
if ( !modName.isEmpty() )
{
+ myActvatingModule = modName;
CAM_Module* mod = module( modName );
if ( !mod )
mod = loadModule( modName );
if ( mod )
res = activateModule( mod );
+ myActvatingModule = QString();
}
else
res = activateModule( 0 );
virtual bool abortAllOperations();
+ QString actvatingModule() const { return myActvatingModule; }
+
private:
void readModuleList();
static ModuleInfoList myInfoList; //!< modules info list
bool myAutoLoad; //!< auto loading flag
bool myBlocked; //!< "blocked" flag, internal usage
+ QString myActvatingModule; //!< Name of currently activating module.
};
#ifdef WIN32
}
else if ( message.toLower().startsWith("register_module_in_study" ) ) {
QString moduleName = message.split( sectionSeparator ).last();
- CAM_Module* mod = module( moduleName );
- if ( !mod )
- mod = module( moduleTitle( moduleName ) );
- if ( !mod ) {
- mod = loadModule( moduleName );
- if ( !mod )
- mod = loadModule( moduleTitle( moduleName) );
- if ( mod ) {
+ // Check name of current activating module name in order to avoid ciclik
+ // call because of messages
+ if (actvatingModule().isNull()) {
+ CAM_Module* mod = module(moduleName);
+ if (!mod)
+ mod = module(moduleTitle(moduleName));
+ if (!mod) {
+ mod = loadModule(moduleName);
+ if (!mod)
+ mod = loadModule(moduleTitle(moduleName));
+ if (mod) {
addModule(mod);
CAM_Study* anActiveStudy = dynamic_cast<CAM_Study*>(activeStudy());
if (anActiveStudy)
mod->connectToStudy(anActiveStudy);
}
- }
+ }
+ }
}
else {
QStringList data = message.split( sectionSeparator );