mySalomeConnector(theConnector),
myPropertyPanel(0),
myObjectBrowser(0),
- myDisplayer(0)
+ myDisplayer(0),
+ myUpdatePrefs(false)
{
myMainWindow = mySalomeConnector ? 0 : new XGUI_MainWindow();
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_DELETED));
aLoop->registerListener(this, Events_Loop::eventByName("LongOperation"));
+ aLoop->registerListener(this, Events_Loop::eventByName(EVENT_PLUGIN_LOADED));
registerValidators();
activateModule();
const ModelAPI_ObjectUpdatedMessage* aUpdMsg =
dynamic_cast<const ModelAPI_ObjectUpdatedMessage*>(theMessage);
onFeatureCreatedMsg(aUpdMsg);
+ if (myUpdatePrefs) {
+ if (mySalomeConnector)
+ mySalomeConnector->createPreferences();
+ myUpdatePrefs = false;
+ }
+ return;
+ }
+ if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_PLUGIN_LOADED)) {
+ myUpdatePrefs = true;
return;
}
}
}
+
//******************************************************
void XGUI_Workshop::onStartWaiting()
{
void XGUI_Workshop::onOperationStarted()
{
ModuleBase_Operation* aOperation = myOperationMgr->currentOperation();
- aOperation->setNestedFeatures(myActionsMgr->nestedCommands(aOperation->id()));
-
+ if (this->isSalomeMode())
+ aOperation->setNestedFeatures(mySalomeConnector->nestedActions(aOperation->id()));
+ else
+ aOperation->setNestedFeatures(myActionsMgr->nestedCommands(aOperation->id()));
+
if (aOperation->getDescription()->hasXmlRepresentation()) { //!< No need for property panel
connectWithOperation(aOperation);
QString::fromStdString(theMessage->tooltip()),
QIcon(theMessage->icon().c_str()),
QKeySequence(), isUsePropPanel);
- salomeConnector()->setNestedActions(aFeatureId, aNestedFeatures.split(" "));
+ salomeConnector()->setNestedActions(aFeatureId, aNestedFeatures.split(" ", QString::SkipEmptyParts));
myActionsMgr->addCommand(aAction);
myModule->featureCreated(aAction);
} else {