We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47a1c35 commit d4b8395Copy full SHA for d4b8395
src/ConnectionGraphicsObject.cpp
@@ -207,13 +207,15 @@ mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
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();
+ if (node) {
+ NodeConnectionInteraction interaction(*node, _connection, _scene);
+ if (interaction.tryConnect()) {
+ node->resetReactionToConnection();
+ return;
215
+ }
216
}
- else if (_connection.connectionState().requiresPort())
217
+
218
+ if (_connection.connectionState().requiresPort())
219
{
220
_scene.deleteConnection(_connection);
221
0 commit comments