| 521 | } |
| 522 | |
| 523 | void GraphicContainer::onSmartRemove(QtNodes::Node* node) |
| 524 | { |
| 525 | auto parent_node = GetParentNode( node ); |
| 526 | NodeState::ConnectionPtrSet conn_out = node->nodeState().connections(PortType::Out, 0); |
| 527 | |
| 528 | if( !parent_node || conn_out.size() == 0 ) |
| 529 | { |
| 530 | return; |
| 531 | } |
| 532 | |
| 533 | { |
| 534 | const QSignalBlocker blocker(this); |
| 535 | for( auto& it: conn_out) |
| 536 | { |
| 537 | auto child_node = it.second->getNode(PortType::In); |
| 538 | _scene->createConnection( *child_node, 0, *parent_node, 0 ); |
| 539 | } |
| 540 | _scene->removeNode( *node ); |
| 541 | nodeReorder(); |
| 542 | } |
| 543 | undoableChange(); |
| 544 | } |
| 545 | |
| 546 | void GraphicContainer::insertNodeInConnection(Connection &connection, QString node_name) |
| 547 | { |
no test coverage detected