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 46807b1a72.

BUG: 482297
This commit is contained in:
Yifan Zhu 2024-03-29 08:00:22 -07:00 committed by Vlad Zahorodnii
parent b4e15b28b6
commit 5272c24301

View file

@ -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();
}
}