Commit dd48fb72 authored by Tom Tom's avatar Tom Tom Committed by Dmitry Kazakov
Browse files

Fix dab inaccuracy of Sharpness brushes when outline preview snapping is disabled

BUG:458361


(cherry picked from commit cca625b7)
parent dd267208
Pipeline #232162 canceled with stage
in 26 minutes and 57 seconds
......@@ -150,7 +150,7 @@ KisOptimizedBrushOutline KisCurrentOutlineFetcher::fetchOutline(const KisPaintIn
}
QPointF pos = info.pos();
if (d->sharpnessOption) {
if (d->sharpnessOption && d->sharpnessOption->alignOutlineToPixels()) {
qint32 x = 0;
qint32 y = 0;
qreal subPixelX = 0.0;
......
......@@ -46,7 +46,12 @@ void KisPressureSharpnessOption::readOptionSetting(const KisPropertiesConfigurat
void KisPressureSharpnessOption::apply(const KisPaintInformation &info, const QPointF &pt, qint32 &x, qint32 &y, qreal &xFraction, qreal &yFraction) const
{
if (isChecked() && alignOutlineToPixels() && KisCurveOption::value() != 0.0) {
if (!isChecked() || KisCurveOption::value() == 0.0) {
// brush
KisPaintOp::splitCoordinate(pt.x(), &x, &xFraction);
KisPaintOp::splitCoordinate(pt.y(), &y, &yFraction);
}
else {
qreal processedSharpness = computeSizeLikeValue(info);
if (processedSharpness == 1.0) {
......@@ -67,10 +72,6 @@ void KisPressureSharpnessOption::apply(const KisPaintInformation &info, const QP
KisPaintOp::splitCoordinate(xf, &x, &xFraction);
KisPaintOp::splitCoordinate(yf, &y, &yFraction);
}
} else {
// brush
KisPaintOp::splitCoordinate(pt.x(), &x, &xFraction);
KisPaintOp::splitCoordinate(pt.y(), &y, &yFraction);
}
}
......
Supports Markdown
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