Commit ec19c45e authored by Sven Langkamp's avatar Sven Langkamp
Browse files

don't mess with the rect if it's empty anyway, prevent some overflow

CCBUG:303311
parent 1b8f1061
......@@ -405,7 +405,7 @@ QRect KisTransformWorker::mirrorX(KisPaintDeviceSP dev, qreal axis, const KisSel
} else {
r = dev->exactBounds();
if (axis > 0) {
if (axis > 0 && !r.isEmpty()) {
// Extend rect so it has the same width on both sides of the axis
qreal distanceFromAxis = qMax(fabs((qreal)r.left() - axis), fabs((qreal)r.right() - axis));
QRect newRect(floor(axis - distanceFromAxis), r.y(), ceil(2*distanceFromAxis), r.height());
......
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