fix: remove duplicate inputs graphically

This commit is contained in:
parker
2025-07-28 21:28:10 +01:00
parent 7347db34ea
commit dabe7c860d
7 changed files with 57 additions and 25 deletions

View File

@@ -9,6 +9,7 @@
#include <memory>
#include <stack>
#include <algorithm>
#include <stdexcept>
#include <string>
enzo::nt::OpId enzo::nt::NetworkManager::addOperator(op::OpInfo opInfo)
@@ -99,8 +100,12 @@ std::vector<enzo::nt::OpId> enzo::nt::NetworkManager::getDependencyGraph(enzo::n
auto inputConnections = getGeoOperator(currentOp).getInputConnections();
for(auto connection : inputConnections)
{
traversalBuffer.push(connection->getInputOpId());
dependencyGraph.push_back(connection->getInputOpId());
if(auto connectionPtr = connection.lock())
{
traversalBuffer.push(connectionPtr->getInputOpId());
dependencyGraph.push_back(connectionPtr->getInputOpId());
}
else { throw std::runtime_error("Connection weak ptr invalid"); }
}
}