feat: trigger node update when new input is connected
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <algorithm>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include "icecream.hpp"
|
||||
|
||||
enzo::nt::OpId enzo::nt::NetworkManager::addOperator(op::OpInfo opInfo)
|
||||
{
|
||||
|
||||
@@ -152,6 +152,8 @@ void Network::socketClicked(SocketGraphic* socket, QMouseEvent *event)
|
||||
// the output node is the node the data flows to
|
||||
auto outputNodeSocket = startSocket_->getIO()==enzo::nt::SocketIOType::Input ? startSocket_ : socket;
|
||||
|
||||
nt::GeometryOperator& geoOp = enzo::nt::nm().getGeoOperator(outputNodeSocket->getOpId());
|
||||
|
||||
std::cout << "CONNECTING opid: " << inputNodeSocket->getOpId() << " -> " << outputNodeSocket->getOpId() << "\n";
|
||||
|
||||
|
||||
@@ -163,6 +165,8 @@ void Network::socketClicked(SocketGraphic* socket, QMouseEvent *event)
|
||||
newEdge->setPos(outputNodeSocket->scenePos(), inputNodeSocket->scenePos());
|
||||
scene_->addItem(newEdge);
|
||||
destroyFloatingEdge();
|
||||
|
||||
geoOp.dirtyNode();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user