]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Creation of sketch objects under Salome is fixed
authorvsv <vitaly.smetannikov@opencascade.com>
Wed, 10 Sep 2014 14:51:11 +0000 (18:51 +0400)
committervsv <vitaly.smetannikov@opencascade.com>
Wed, 10 Sep 2014 14:51:11 +0000 (18:51 +0400)
src/NewGeom/NewGeom_Module.cpp
src/XGUI/XGUI_Workshop.cpp

index 1caf55c95f97fca31bd11a50ff5a53570639179b..a02f119989853835610bf25b378e42f023a03613 100644 (file)
@@ -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 );
index a2c6ff0f0d0d5eeb49c6c8d8e46f31a609b67a26..e6bcf1ca41a076a27ec9e96a0bf1fa76cf0d5a7f 100644 (file)
@@ -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 {