Commit bd7119e6 authored by Jan Hambrecht's avatar Jan Hambrecht

fix handling of size for derived shapes that reimplement siez() and setSize()

parent 62c9395f
......@@ -383,11 +383,13 @@ void KoShape::setSize(const QSizeF &newSize)
QSizeF oldSize(size());
if (oldSize == newSize)
// always set size, as d->size and size() may vary
d->size = newSize;
if (oldSize == newSize)
......@@ -644,8 +646,8 @@ QPainterPath KoShape::outline() const
QRectF KoShape::outlineRect() const
Q_D(const KoShape);
return QRectF(QPointF(0, 0), QSizeF(qMax(d->size.width(), qreal(0.0001)), qMax(d->size.height(), qreal(0.0001))));
const QSizeF s = size();
return QRectF(QPointF(0, 0), QSizeF(qMax(s.width(), qreal(0.0001)), qMax(s.height(), qreal(0.0001))));
QPointF KoShape::absolutePosition(KoFlake::Position anchor) 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