diff --git a/src/graph/GraphView.cpp b/src/graph/GraphView.cpp index 89aeb1241b30069f1a39320ab6342b690e9d4216..b07a9d0a2bfd5d174456844a1fe942d23d1aa117 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,