Commit 81b69b23 authored by Halla Rempt's avatar Halla Rempt


Apparently this is possible, and Qt Creator complains about returning
the rect the old-fashioned way...
parent ec884202
......@@ -292,11 +292,12 @@ QPointF KisTool::pixelToView(const QPointF &pixelCoord) const
QRectF KisTool::pixelToView(const QRectF &pixelRect) const
if (!image())
if (!image()) {
return pixelRect;
QPointF topLeft = pixelToView(pixelRect.topLeft());
QPointF bottomRight = pixelToView(pixelRect.bottomRight());
return QRectF(topLeft, bottomRight);
return {topLeft, bottomRight};
QPainterPath KisTool::pixelToView(const QPainterPath &pixelPolygon) const
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