feat: socket padding, fix floating edge start pos

This commit is contained in:
parker
2025-06-21 01:25:47 +01:00
parent 1cfcb0e429
commit b10f9322b2
4 changed files with 6 additions and 4 deletions

View File

@@ -53,13 +53,14 @@ Network::Network(QWidget* parent)
mainLayout_->addWidget(view_);
}
void Network::socketClicked(SocketGraphic* socket)
void Network::socketClicked(SocketGraphic* socket, QMouseEvent *event)
{
std::cout << "socket clicked\n";
if(!floatingEdge_)
{
std::cout << "creating floating edge\n";
floatingEdge_ = new FloatingEdgeGraphic(socket);
floatingEdge_->setFloatPos(view_->mapToScene(event->pos()));
scene_->addItem(floatingEdge_);
}
}