-// Copyright (C) 2006-2015 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2019 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
Bloc *undoBloc = new Bloc(blocName.str());
undoProc->edAddChild(undoBloc);
ComposedNode *newFather = undoBloc;
- Node *clone = _node->clone(0);
+ Node *clone = _node->cloneWithoutCompAndContDeepCpy(0);
newFather->edAddChild(clone);
// --- register a CommandCopyNode from undoProc
YASSERT(cnp);
Proc *proc = GuiContext::getCurrent()->getProc();
Proc *fromproc=_node->getProc();
+ if(proc != fromproc)
+ {
+ GuiContext::getCurrent()->_lastErrorMessage = "It is not possible to paste an object from one schema to another.";
+ DEBTRACE(GuiContext::getCurrent()->_lastErrorMessage);
+ return false;
+ }
string position = "";
if (fromproc != dynamic_cast<Proc*>(_node))