| 198 | |
| 199 | |
| 200 | void |
| 201 | ConnectionGraphicsObject:: |
| 202 | mouseReleaseEvent(QGraphicsSceneMouseEvent* event) |
| 203 | { |
| 204 | ungrabMouse(); |
| 205 | event->accept(); |
| 206 | |
| 207 | auto node = locateNodeAt(event->scenePos(), _scene, |
| 208 | _scene.views()[0]->transform()); |
| 209 | |
| 210 | NodeConnectionInteraction interaction(*node, _connection, _scene); |
| 211 | |
| 212 | if (node && interaction.tryConnect()) |
| 213 | { |
| 214 | node->resetReactionToConnection(); |
| 215 | _scene.connectionCreated(_connection); |
| 216 | } |
| 217 | else if (_connection.connectionState().requiresPort()) |
| 218 | { |
| 219 | _scene.deleteConnection(_connection); |
| 220 | } |
| 221 | } |
| 222 | |
| 223 | |
| 224 | void |
nothing calls this directly
no test coverage detected