ShowImage: fix scale-to-fit behavior

* Fix the condition so that big images are fitted to the window on first
time only if the option is set.
* Small images are never stretched to the window size, as this isn't
very useful.

The interaction of this global setting with the zoom buttons is a bit
confusing. Should they be merged?
This commit is contained in:
Adrien Destugues 2014-04-27 17:59:54 +02:00
parent cb2c4f8d44
commit 2bd9c8a5f9

View File

@ -1630,7 +1630,7 @@ ShowImageView::FitToBounds()
return;
float fitToBoundsZoom = _FitToBoundsZoom();
if (!fStretchToBounds && fitToBoundsZoom > 1.0f)
if (!fStretchToBounds || fitToBoundsZoom > 1.0f)
SetZoom(1.0f);
else
SetZoom(fitToBoundsZoom);