Keep crop handles inside selection rectangle
Summary:
In 307816e2819f the horizontal and vertical crop selection handles
are moved inside the visual viewport if the selection rectangle is
only partly visible. In some situations this leads to a rectangle
outside the viewport but visible handles isolated from the selection.
This patch makes sure the handles are kept inside the selection
rectangle and are not visible if this is outside the viewport.
FIXED-IN: 18.08.0
Test Plan:
- Open Gwenview in View Mode
- Enter Crop tool (⇧+C)
- Select a small rectangle
- Zoom in until rectangle is partly visible
- Scroll selection rectangle outside viewport
- Check that none of the handles is still visible
Reviewers: Gwenview, rkflx
Reviewed By: Gwenview, rkflx
Subscribers: rkflx
Differential Revision: https://phabricator.kde.org/D14396