X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fhmi%2FguiObservers.cxx;h=d8b053daf062e94da4fff637f690124acb186e9a;hb=c9208a8ef7f32a620d9650908588320ff159a167;hp=57d53d1b7cd3ffbee16ed4349644ce54531a9225;hpb=5e3d4c34b008ce0726db84073c523ef58441a3c5;p=modules%2Fyacs.git diff --git a/src/hmi/guiObservers.cxx b/src/hmi/guiObservers.cxx index 57d53d1b7..d8b053daf 100644 --- a/src/hmi/guiObservers.cxx +++ b/src/hmi/guiObservers.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2006-2014 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 @@ -824,6 +824,12 @@ bool SubjectNode::copy(Subject* parent) 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(_node)) @@ -902,7 +908,7 @@ void SubjectNode::saveLinks() Node* n2=_node; DEBTRACE(n1->getName()<< " " << n2->getName()); } - std::set::const_iterator iti; + std::list::const_iterator iti; for(iti=singate.begin();iti != singate.end();iti++) { Node* n1=_node; @@ -1076,7 +1082,7 @@ void SubjectNode::restoreLinks() } } - std::set::const_iterator it2; + std::list::const_iterator it2; for(it2=singate.begin();it2 != singate.end();it2++) { Node* n1=_node; @@ -1649,8 +1655,8 @@ void SubjectComposedNode::loadLinks() { SubjectNode* sno = GuiContext::getCurrent()->_mapOfSubjectNode[*itn]; OutGate* outgate = (*itn)->getOutGate(); - std::set setIngate = outgate->edSetInGate(); - std::set::const_iterator itg; + std::list setIngate = outgate->edSetInGate(); + std::list::const_iterator itg; for(itg = setIngate.begin(); itg != setIngate.end(); ++itg) { Node* inNode = (*itg)->getNode();