Commit 9322b31b authored by Halla Rempt's avatar Halla Rempt
Browse files

Draw the line to the last cursor position when using weighted smoothing

However, the last bit isn't drawns with weighted smoothing.

CCBUG:312437
parent 525e4ff2
......@@ -279,7 +279,12 @@ void KisToolFreehand::mouseReleaseEvent(KoPointerEvent* e)
{
if (mode() == KisTool::PAINT_MODE &&
e->button() == Qt::LeftButton) {
if (m_smoothingOptions.smoothingType == KisSmoothingOptions::WEIGHTED_SMOOTHING) {
m_smoothingOptions.smoothingType = KisSmoothingOptions::SIMPLE_SMOOTHING;
m_helper->setSmoothness(m_smoothingOptions);
doStroke(e);
m_smoothingOptions.smoothingType = KisSmoothingOptions::WEIGHTED_SMOOTHING;
}
endStroke();
if (m_assistant) {
......
......@@ -247,8 +247,6 @@ void KisToolFreehandHelper::paint(KoPointerEvent *event)
paintLine(m_d->painterInfos, m_d->previousPaintInformation, info);
}
m_d->previousPaintInformation = info;
if(m_d->airbrushingTimer.isActive()) {
......@@ -292,7 +290,7 @@ const KisPaintOp* KisToolFreehandHelper::currentPaintOp() const
void KisToolFreehandHelper::finishStroke()
{
if(m_d->haveTangent) {
if (m_d->haveTangent) {
m_d->haveTangent = false;
QPointF newTangent = (m_d->previousPaintInformation.pos() - m_d->olderPaintInformation.pos()) / 3.0;
......
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