Bug 467971

Summary: Grid extends 1px outside the bottom/right of image
Product: [Applications] krita Reporter: Freya Lupen <penguinflyer2222>
Component: GeneralAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: normal CC: halla
Priority: NOR Keywords: regression
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Freya Lupen 2023-03-30 14:10:51 UTC
SUMMARY
The grid is extending 1px off the bottom and right sides of the image. This appears to have been introduced in commit 76471979 (https://invent.kde.org/graphics/krita/-/commit/764719791a4ce6887aedc9d92777f3c4a03198c6).

STEPS TO REPRODUCE
1. Open a preferably small document.
2. Turn on the Grid. (View->Show Grid.)
3. Observe the bottom right of the image closely.

OBSERVED RESULT
Grid overhangs the image by 1px on bottom and right sides.

EXPECTED RESULT
Grid stays inside image bounds.

SOFTWARE/OS VERSIONS
5.2.x-2f3e75cc. Was introduced in release version 5.1.4.

ADDITIONAL INFORMATION
Was reported on KA here: https://krita-artists.org/t/the-grid-always-is-showing-1px-bigger-than-image/57895/
Comment 1 Dmitry Kazakov 2023-04-04 12:18:20 UTC
Git commit 69aa08e44a7207e8da505dd4e5652f5a2df11e10 by Dmitry Kazakov.
Committed on 04/04/2023 at 12:18.
Pushed by dkazakov into branch 'master'.

Fix too long grid lines in the grid decoration

M  +7    -4    libs/ui/canvas/kis_grid_decoration.cpp

https://invent.kde.org/graphics/krita/commit/69aa08e44a7207e8da505dd4e5652f5a2df11e10