MCPcopy Create free account
hub / github.com/BehaviorTree/Groot / mouseReleaseEvent

Method mouseReleaseEvent

QtNodeEditor/src/ConnectionGraphicsObject.cpp:200–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198
199
200void
201ConnectionGraphicsObject::
202mouseReleaseEvent(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
224void

Callers

nothing calls this directly

Calls 2

locateNodeAtFunction · 0.85
requiresPortMethod · 0.80

Tested by

no test coverage detected