mod = loadModule(moduleTitle(moduleName));
if (mod) {
addModule(mod);
- CAM_Study* anActiveStudy = dynamic_cast<CAM_Study*>(activeStudy());
- if (anActiveStudy)
- mod->connectToStudy(anActiveStudy);
+ }
+ }
+ if (mod) {
+ CAM_Study* anActiveStudy = dynamic_cast<CAM_Study*>(activeStudy());
+ if (anActiveStudy) {
+ mod->connectToStudy(anActiveStudy);
+ LightApp_DataModel* aDM = dynamic_cast<LightApp_DataModel*>(mod->dataModel());
+ if(aDM) {
+ aDM->initRootObject();
+ }
}
}
}
int groupId() const;
void registerColumn( SUIT_DataBrowser*, const QString&, const int );
void unregisterColumn( SUIT_DataBrowser*, const QString& );
+ //! For initialization of the data model and registration of SComponent when study is created
+ //! but module was not activated.
+ virtual void initRootObject() {};
signals:
void opened();