feat: trigger node update when new input is connected
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include "icecream.hpp"
|
||||||
|
|
||||||
enzo::nt::OpId enzo::nt::NetworkManager::addOperator(op::OpInfo opInfo)
|
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
|
// the output node is the node the data flows to
|
||||||
auto outputNodeSocket = startSocket_->getIO()==enzo::nt::SocketIOType::Input ? startSocket_ : socket;
|
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";
|
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());
|
newEdge->setPos(outputNodeSocket->scenePos(), inputNodeSocket->scenePos());
|
||||||
scene_->addItem(newEdge);
|
scene_->addItem(newEdge);
|
||||||
destroyFloatingEdge();
|
destroyFloatingEdge();
|
||||||
|
|
||||||
|
geoOp.dirtyNode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user