Salome HOME
projects
/
modules
/
yacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WIP
[modules/yacs.git]
/
src
/
hmi
/
guiObservers.cxx
diff --git
a/src/hmi/guiObservers.cxx
b/src/hmi/guiObservers.cxx
index 57d53d1b7cd3ffbee16ed4349644ce54531a9225..d8b053daf062e94da4fff637f690124acb186e9a 100644
(file)
--- a/
src/hmi/guiObservers.cxx
+++ b/
src/hmi/guiObservers.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2006-201
4
CEA/DEN, EDF R&D
+// Copyright (C) 2006-201
9
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
//
// 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();
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))
string position = "";
if (fromproc != dynamic_cast<Proc*>(_node))
@@
-902,7
+908,7
@@
void SubjectNode::saveLinks()
Node* n2=_node;
DEBTRACE(n1->getName()<< " " << n2->getName());
}
Node* n2=_node;
DEBTRACE(n1->getName()<< " " << n2->getName());
}
- std::
se
t<InGate *>::const_iterator iti;
+ std::
lis
t<InGate *>::const_iterator iti;
for(iti=singate.begin();iti != singate.end();iti++)
{
Node* n1=_node;
for(iti=singate.begin();iti != singate.end();iti++)
{
Node* n1=_node;
@@
-1076,7
+1082,7
@@
void SubjectNode::restoreLinks()
}
}
}
}
- std::
se
t<InGate *>::const_iterator it2;
+ std::
lis
t<InGate *>::const_iterator it2;
for(it2=singate.begin();it2 != singate.end();it2++)
{
Node* n1=_node;
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();
{
SubjectNode* sno = GuiContext::getCurrent()->_mapOfSubjectNode[*itn];
OutGate* outgate = (*itn)->getOutGate();
- std::
se
t<InGate*> setIngate = outgate->edSetInGate();
- std::
se
t<InGate*>::const_iterator itg;
+ std::
lis
t<InGate*> setIngate = outgate->edSetInGate();
+ std::
lis
t<InGate*>::const_iterator itg;
for(itg = setIngate.begin(); itg != setIngate.end(); ++itg)
{
Node* inNode = (*itg)->getNode();
for(itg = setIngate.begin(); itg != setIngate.end(); ++itg)
{
Node* inNode = (*itg)->getNode();