From 0f145438da5fda64544d77b9ed25b6124d067571 Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 10 Sep 2014 18:51:11 +0400 Subject: [PATCH] Creation of sketch objects under Salome is fixed --- src/NewGeom/NewGeom_Module.cpp | 4 +++- src/XGUI/XGUI_Workshop.cpp | 9 ++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/NewGeom/NewGeom_Module.cpp b/src/NewGeom/NewGeom_Module.cpp index 1caf55c95..a02f11998 100644 --- a/src/NewGeom/NewGeom_Module.cpp +++ b/src/NewGeom/NewGeom_Module.cpp @@ -284,8 +284,10 @@ void NewGeom_Module::contextMenuPopup(const QString& theClient, QMenu* theMenu, //****************************************************** void NewGeom_Module::createPreferences() { - XGUI_Preferences::updateCustomProps(); LightApp_Preferences* pref = preferences(); + if (!pref) + return; + XGUI_Preferences::updateCustomProps(); QString aModName = moduleName(); QtxPreferenceItem* item = pref->findItem(aModName, true ); diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index a2c6ff0f0..e6bcf1ca4 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -406,8 +406,11 @@ void XGUI_Workshop::onObjectDeletedMsg(const ModelAPI_ObjectDeletedMessage* theM 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); @@ -475,7 +478,7 @@ void XGUI_Workshop::addFeature(const Config_FeatureMessage* theMessage) 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 { -- 2.39.2