Salome HOME
Traces
[modules/superv.git] / src / GraphEditor / DataFlowEditor_OutNode.hxx
index c8640b0f50cbd6ca1985a411c999d35b3387458e..cf560f07972fb939086d77e5b4b460f76cf77926 100644 (file)
@@ -170,9 +170,15 @@ namespace GraphEditor {
            return _Graph->RemoveNode( NodeName ) ; } ;
       bool ReNameNode( const char* OldNodeName ,
                        const char* NewNodeName ) {
-           DateModification() ;
-           _Valid = false ;
-           return _Graph->ReNameNode( OldNodeName , NewNodeName ) ; } ;
+//PAL9048 JR Debug : a node may not have the same name as the graph
+           if ( strcmp( Graph()->Name() , NewNodeName ) ) {
+             DateModification() ;
+             _Valid = false ;
+             return _Graph->ReNameNode( OldNodeName , NewNodeName ) ;
+          }
+           cdebug << "Editor::OutNode::ReNameNode ERROR "  << NewNodeName << " already exists"
+                  << endl ;
+           return false ; } ;
 
       void Coordinates( const int X , const int Y ) {
            return _Graph->Coordinates( X , Y ) ; } ;