aboutsummaryrefslogtreecommitdiff
path: root/pageitem.cc
diff options
context:
space:
mode:
Diffstat (limited to 'pageitem.cc')
-rw-r--r--pageitem.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/pageitem.cc b/pageitem.cc
index 09c84ae..b5be4cf 100644
--- a/pageitem.cc
+++ b/pageitem.cc
@@ -35,7 +35,7 @@ PageItem::PageItem(AfdNotebook *nb, PaperReplay *replay, int pageNum, QGraphicsI
bg->setShapeMode(QGraphicsPixmapItem::BoundingRectShape);
bg->setTransformationMode(Qt::SmoothTransformation);
QRectF bgRect = bg->boundingRect();
- bg->scale(_pageTrim.width() / bgRect.width(), _pageTrim.height() / bgRect.height());
+ bg->setScale(std::min(_pageTrim.width() / bgRect.width(), _pageTrim.height() / bgRect.height()));
bg->setPos(_pageTrim.topLeft());
}