From 5272c243016d6a6abd38e63004c212f3f61897c6 Mon Sep 17 00:00:00 2001 From: Yifan Zhu Date: Fri, 29 Mar 2024 08:00:22 -0700 Subject: [PATCH] plugins/mousemark: clear drawing when no modifiers are pressed Previously when drawing has length 1, it is not cleared. So the remaining point in drawing can connect with the new point when the user represses the modifiers, leading to a unexpected mark. This ammends commit 46807b1a72f1d760b52b92a574face4a7a509a39. BUG: 482297 --- src/plugins/mousemark/mousemark.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/mousemark/mousemark.cpp b/src/plugins/mousemark/mousemark.cpp index ff5d79e710..2e0a063524 100644 --- a/src/plugins/mousemark/mousemark.cpp +++ b/src/plugins/mousemark/mousemark.cpp @@ -211,8 +211,8 @@ void MouseMarkEffect::slotMouseChanged(const QPointF &pos, const QPointF &, } else { // neither freedraw, nor arrowdraw modifiers pressed, but mouse moved if (drawing.length() > 1) { marks.append(drawing); - drawing.clear(); } + drawing.clear(); arrow_tail = nullPoint(); } }