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.
This commit is contained in:
Karol Kosek 2021-04-11 20:03:18 +02:00 committed by Felix Queißner
parent c740189bca
commit 9c883b55d4
1 changed files with 2 additions and 0 deletions

View File

@ -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());
});