Update view offset in higher zoom levels after image size changed

Authored by muhlenpfordt on Apr 16 2018, 6:44 AM.

Description

Update view offset in higher zoom levels after image size changed

Summary:
After cropping a zoomed image and undoing this operation the view
offset is wrong in some cases.
This patch updates image offset and scroll position after a raster
image rect was changed.

FIXED-IN: 18.04.1

Test Plan:

  • Open image in View Mode with a zoom level to enable scroll
  • Edit one time to show save bar (e.g. resize, rotate)
  • Crop to a rectangle with distance from left and top edge
  • Undo
  • Image should display in whole window again

Reviewers: Gwenview, rkflx

Reviewed By: Gwenview, rkflx

Subscribers: rkflx

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

Details