| 544 | } |
| 545 | |
| 546 | void GraphicContainer::insertNodeInConnection(Connection &connection, QString node_name) |
| 547 | { |
| 548 | { |
| 549 | const QSignalBlocker blocker(this); |
| 550 | |
| 551 | auto parent_node = connection.getNode(PortType::Out); |
| 552 | auto child_node = connection.getNode(PortType::In); |
| 553 | |
| 554 | QPointF pos = child_node->nodeGraphicsObject().pos(); |
| 555 | pos.setX( pos.x() - 50 ); |
| 556 | |
| 557 | QtNodes::Node& inserted_node = _scene->createNodeAtPos( node_name, node_name, pos ); |
| 558 | |
| 559 | _scene->deleteConnection(connection); |
| 560 | _scene->createConnection(*child_node, 0, inserted_node, 0); |
| 561 | _scene->createConnection(inserted_node, 0, *parent_node, 0); |
| 562 | nodeReorder(); |
| 563 | } |
| 564 | undoableChange(); |
| 565 | } |
| 566 | |
| 567 | void GraphicContainer::onConnectionContextMenu(QtNodes::Connection &connection, const QPointF&) |
| 568 | { |
no outgoing calls
no test coverage detected