From 0442d3d8199ff315b391ba5455d55f5d02bf7320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20L=C3=A1ska?= Date: Tue, 10 Sep 2024 22:19:40 +0200 Subject: [PATCH] Fixed snap management in create node. Snapping will no longer take into account the current node, allowing free movement on the canvas. --- src/Interactions/CreateNodeInteraction.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Interactions/CreateNodeInteraction.cpp b/src/Interactions/CreateNodeInteraction.cpp index e35e3d769..b89a5428e 100644 --- a/src/Interactions/CreateNodeInteraction.cpp +++ b/src/Interactions/CreateNodeInteraction.cpp @@ -45,6 +45,8 @@ QString CreateNodeInteraction::toHtml() void CreateNodeInteraction::snapMousePressEvent(QMouseEvent * ev, Feature* aFeat) { if (CAST_NODE(aFeat)) { + clearNoSnap(); + addToNoSnap(aFeat); return theMoveInteraction->snapMousePressEvent(ev, aFeat); } else { SAFE_DELETE(theMoveInteraction); @@ -77,6 +79,7 @@ void CreateNodeInteraction::snapMouseReleaseEvent(QMouseEvent * ev, Feature* aFe { if (theMoveInteraction) { theMoveInteraction->snapMouseReleaseEvent(ev, aFeat); + clearNoSnap(); return; }