From 9c883b55d489500177709d563cd94d77327f78b9 Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Sun, 11 Apr 2021 20:03:18 +0200 Subject: BrowserTab: reset image scaling for small images When you viewed a small image after the bigger one in the same tab, then the graphics_browser was still trying to scale them to the window size. --- src/browsertab.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/browsertab.cpp') diff --git a/src/browsertab.cpp b/src/browsertab.cpp index f995bc9..32927fc 100644 --- a/src/browsertab.cpp +++ b/src/browsertab.cpp @@ -736,6 +736,8 @@ void BrowserTab::renderPage(const QByteArray &data, const MimeType &mime) if (imageSize.width() > browserSize.width() || imageSize.height() > browserSize.height()) this->ui->graphics_browser->fitInView(graphics_scene.sceneRect(), Qt::KeepAspectRatio); + else + this->ui->graphics_browser->resetTransform(); this->ui->graphics_browser->setSceneRect(graphics_scene.sceneRect()); }); -- cgit v1.2.3