Fix image smoothing sometimes not getting applied

Authored by rkflx on Jul 21 2018, 10:39 PM.

Description

Fix image smoothing sometimes not getting applied

Summary:
In View mode, smoothing is applied for scaling up raster images up
to 400%. In general this works fine, but in some cases the smoothing
becomes visible only after zooming manually.

This is due to defaulting to Qt::FastTransformation and switching to
Qt::SmoothTransformation only for changes in the zoom level and for
the Fit/Fill zoom modes, but not when the zoom level is unchanged
when navigating to an image.

The issue can be fixed by calling onZoomChanged, which not only calls
updateBuffer as before, but also setTransformationMode.

BUG: 396736
FIXED-IN: 18.08.0

Test Plan:
Enable Image ViewZoom modeKeep same zoom and position, zoom
in to a zoom level just below 400% and switch to the next image.
Smoothing should be applied immediately, without having to zoom in and
out again.

Reviewers: Gwenview, ngraham

Reviewed By: Gwenview, ngraham

Subscribers: muhlenpfordt, ngraham

Differential Revision: https://phabricator.kde.org/D14269

Details

Committed
rkflxJul 24 2018, 6:03 AM
Reviewer
Gwenview
Differential Revision
D14269: Fix image smoothing sometimes not getting applied
Parents
R260:ce59e33bcce4: GIT_SILENT made messages (after extraction)
Branches
Unknown
Tags
Unknown