From 10f1b21fb7ec2beeef42b43bef53e30fdb4e87eb Mon Sep 17 00:00:00 2001 From: consolegrl <5942029+consolegrl@users.noreply.github.com> Date: Thu, 7 Sep 2023 22:19:56 -0400 Subject: [PATCH] fixes #4049: Off-grid nodes not draggable (#6852) The quantPos arg of AutomationClip::setDragValue causes the node time to be quantized before its looked up in the timeMap iterator. This results in the node not being found and a new one being created inside the setDragValue function even though we had found one. Simply setting it to true causes this bug, simply setting it to false causes a new node to be created off grid/not snapped. So the fix is to quantize the position for the lookup only if we haven't found an existing node under the cursor. --- src/gui/editors/AutomationEditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/editors/AutomationEditor.cpp b/src/gui/editors/AutomationEditor.cpp index a24165332..f98066bba 100644 --- a/src/gui/editors/AutomationEditor.cpp +++ b/src/gui/editors/AutomationEditor.cpp @@ -531,7 +531,7 @@ void AutomationEditor::mousePressEvent( QMouseEvent* mouseEvent ) : POS(clickedNode) ), level, - true, + clickedNode == tm.end(), mouseEvent->modifiers() & Qt::ControlModifier );