From: vsv Date: Wed, 10 Sep 2014 14:51:11 +0000 (+0400) Subject: Creation of sketch objects under Salome is fixed X-Git-Tag: V_0.4.4~76^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0f145438da5fda64544d77b9ed25b6124d067571;p=modules%2Fshaper.git Creation of sketch objects under Salome is fixed --- 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 {