Salome HOME
Fix a regression on copy/paste a node in schema.
[modules/yacs.git] / src / hmi / commandsProc.cxx
index 72af807d1f7ffe1b850dbcabb27908ad9baf5208..1a6e901bf0f3dac531a93fc10f107280cc3d540a 100644 (file)
@@ -574,7 +574,7 @@ bool CommandPutInComposedNode::localExecute()
          //create a ComposedNode (type _type) with name _newParent
          YACS::ENGINE::Catalog *catalog = YACS::ENGINE::getSALOMERuntime()->getBuiltinCatalog();
          Node* nodeToClone = catalog->_composednodeMap[_type];
-         composednode = nodeToClone->clone(0);
+         composednode = nodeToClone->cloneWithoutCompAndContDeepCpy(0);
          composednode->setName(_newParent);
          //add the new composednode as child of oldfather
          oldFather->edAddChild(composednode);
@@ -709,7 +709,7 @@ bool CommandCopyNode::localExecute()
         if (!loop->edGetDirectDescendants().empty())
           throw YACS::Exception("Already a node in a new parent of Loop type");
       //_clone = node->cloneWithoutCompAndContDeepCpy(newFather);
-      _clone = node->clone(0);
+      _clone = node->cloneWithoutCompAndContDeepCpy(0);
       if (!_clone)
         throw YACS::Exception("Node cannot be cloned");
       int nodeSuffix = -1;