From fe90a39c4afcea9da162f18a44b1f482a9322e8e Mon Sep 17 00:00:00 2001
From: cmoineau <cyril.moineau@cea.fr>
Date: Wed, 5 Jun 2024 16:19:25 +0000
Subject: [PATCH] GraphView::add, revert true -> false.

---
 src/graph/GraphView.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/graph/GraphView.cpp b/src/graph/GraphView.cpp
index 89aeb1241..b07a9d0a2 100644
--- a/src/graph/GraphView.cpp
+++ b/src/graph/GraphView.cpp
@@ -659,8 +659,9 @@ bool Aidge::GraphView::add(std::set<std::shared_ptr<Node>> otherNodes, bool incl
   for (auto node : nodesToAdd) {
     if (mNodeRegistry.find(node->name()) != mNodeRegistry.end()){
       std::string newName = node->createUniqueName(node->name());
-      node->setName(newName);
       fmt::print("Warning: node name \"{}\" is a duplicate, renaming to {}.\n", node->name(), newName);
+      node->setName(newName);
+
     }
   }
   // List the nodes to rank, initially all the nodes in the GraphView
@@ -760,7 +761,7 @@ bool Aidge::GraphView::add(std::pair<NodePtr, std::set<NodePtr>> nodes, bool inc
 bool Aidge::GraphView::add(std::shared_ptr<GraphView> graph) {
     // set the rootNode to the other graphView rootNode if no rootNode yet
     mRootNode = mRootNode ? mRootNode : graph->rootNode();
-    return add(graph->getNodes(), true);
+    return add(graph->getNodes(), false);
 }
 
 void Aidge::GraphView::addChild(std::shared_ptr<Node> toOtherNode,
-- 
GitLab