Commit 663d3d09 authored by Ivan Yossi's avatar Ivan Yossi 👌

Clear any left over point in line tool on each use

We clear points on any single click in line tool to avoid false starts.

BUG:408439
parent 3738e293
......@@ -264,6 +264,7 @@ void KisToolLine::endStroke()
NodePaintAbility nodeAbility = nodePaintAbility();
if (!m_strokeIsRunning || m_startPoint == m_endPoint || nodeAbility == UNPAINTABLE) {
m_helper->clearPoints();
return;
}
......
......@@ -162,7 +162,7 @@ void KisToolLineHelper::end()
KIS_ASSERT_RECOVER_RETURN(isRunning());
endPaint();
m_d->linePoints.clear();
clearPoints();
}
......@@ -172,6 +172,12 @@ void KisToolLineHelper::cancel()
KIS_ASSERT_RECOVER_RETURN(isRunning());
cancelPaint();
clearPoints();
}
void KisToolLineHelper::clearPoints()
{
m_d->linePoints.clear();
}
......
......@@ -43,6 +43,7 @@ public:
void translatePoints(const QPointF &offset);
void end();
void cancel();
void clearPoints();
void clearPaint();
using KisToolFreehandHelper::isRunning;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment