Commit 19bc03b8 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Remove pixel rounding in KoUnit

The user might need to align a shape precisely, then rounding will break his
workflow.
parent bde5cdca
......@@ -150,7 +150,7 @@ qreal KoUnit::toUserValue(qreal ptValue) const
case Cicero:
return toCicero(ptValue);
case Pixel:
return floor(ptValue * m_pixelConversion + 0.5);
return ptValue * m_pixelConversion;
case Point:
default:
return toPoint(ptValue);
......
......@@ -143,8 +143,7 @@ void KoUnitDoubleSpinBox::setUnit( KoUnit unit )
qreal step = unit.toUserValue( d->stepInPoints );
if (unit.type() == KoUnit::Pixel) {
// KoUnit rounds the pixel value to 1.0, so we cannot
// have step less than 1.0.
// limit the pixel step by 1.0
step = qMax(1.0, step);
}
......
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