Bug 427094 - Cursor Snapping when more than 1 document open
Summary: Cursor Snapping when more than 1 document open
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Freehand (show other bugs)
Version: 4.3.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-29 01:55 UTC by Andrew
Modified: 2020-12-02 08:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew 2020-09-29 01:55:11 UTC
SUMMARY
Cursor Snapping when more than 1 document open.

STEPS TO REPRODUCE
1. Launch Krita.
2. Open a document (DocumentA.kra)[5100 x 3300 @300ppi].
3. Open a second document (DocumentB.kra)[5100 x 5100 @300ppi].
4. Set zoom level to "Fit to Page" on DocumentB.kra
5. Switch to DocumentA.kra and set zoom level to 100%.
6. With the "Freehand Brush Tool" selected, move cursor around the canvas to observe cursor snapping behavior.

OBSERVED RESULT
Cursor will have a snapping behavior while using the Freehand Brush Tool. Snapping will temporarily disable if you apply a stroke to the canvas, but will occur again once the stroke is finished and you continue to move the cursor around the canvas.


EXPECTED RESULT
Cursor should not be snapping while snapping is disabled if there are more than 1 document open that have different zoom levels set.


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Please reach out personally to my email if you would like a video recording if you are unable to reproduce.
Comment 1 Ahab Greybeard 2020-09-29 15:09:07 UTC
I can reproduce this effect on the 4.3.0, 4.4.0 beta-1 and the Sep2 4.4. alpha (git b05df90) appimages.

It's not technically snapping, it's jumping.

The jumping does not happen to the cursor. It happens to the outline and is best seen with a Circle outline or a Preview outline of a circular brush.

When painting a stroke, the outline jumps but the painted dab is placed on the cursor position. In that sense it's a cosmetic problem.

The jumping happens on a rectangular grid.
The size of the jump is not related to the brush size or the brush spacing.
It is related to the image size and a 5000 x 5000 image has a jump grid of about 28 px. a 2000 x 2000 image has a jump grib of about 12 px.

It only happens if one of the images is set to a zoom of 'Fit Page' and the other image is set to a higher zoom percentage. If the jumping image has its zoom level adjusted, the jumping stops.
It will start again if you select the Fit Page image and then go back to the higher zoomed image.
Comment 2 Dmitry Kazakov 2020-09-29 20:04:00 UTC
That is a regression in 4.3.0, I guess. It is caused by my anti-strobing outline fix.
Comment 3 Ahab Greybeard 2020-09-29 20:30:51 UTC
I forgot to check for regression.
It does not happen in 4.2.8 but it does happen in 4.2.9.
So, a regression in 4.2.9?
Comment 4 Dmitry Kazakov 2020-09-29 20:37:12 UTC
Git commit 13dbc981624dc35dbbe8d05ae1a10d0370ff7e07 by Dmitry Kazakov.
Committed on 29/09/2020 at 20:33.
Pushed by dkazakov into branch 'krita/4.3'.

Fix brush outline jumps when switching between documents of different zoom

M  +1    -0    libs/ui/KisViewManager.cpp
M  +9    -1    libs/ui/kis_zoom_manager.cc
M  +1    -0    libs/ui/kis_zoom_manager.h

https://invent.kde.org/graphics/krita/commit/13dbc981624dc35dbbe8d05ae1a10d0370ff7e07
Comment 5 Dmitry Kazakov 2020-09-29 20:37:53 UTC
Git commit f11a08cf018e187dd8a4871eff067ebaeee1b1fd by Dmitry Kazakov.
Committed on 29/09/2020 at 20:37.
Pushed by dkazakov into branch 'master'.

Fix brush outline jumps when switching between documents of different zoom

M  +1    -0    libs/ui/KisViewManager.cpp
M  +9    -1    libs/ui/kis_zoom_manager.cc
M  +1    -0    libs/ui/kis_zoom_manager.h

https://invent.kde.org/graphics/krita/commit/f11a08cf018e187dd8a4871eff067ebaeee1b1fd
Comment 6 Dmitry Kazakov 2020-10-06 07:45:05 UTC
Git commit 6b704a4b1e609f2cce65595fd529cadf39d34afa by Dmitry Kazakov.
Committed on 06/10/2020 at 07:44.
Pushed by dkazakov into branch 'master'.

Fix brush outline jumps when switching between documents of different zoom

M  +1    -0    libs/ui/KisViewManager.cpp
M  +9    -1    libs/ui/kis_zoom_manager.cc
M  +1    -0    libs/ui/kis_zoom_manager.h

https://invent.kde.org/graphics/krita/commit/6b704a4b1e609f2cce65595fd529cadf39d34afa
Comment 7 Ahab Greybeard 2020-11-29 20:24:13 UTC
A similar bug has been reported: https://bugs.kde.org/show_bug.cgi?id=429790

This may need further testing aand investigation.
Comment 8 Ahab Greybeard 2020-12-02 08:18:06 UTC
The 4.4.2 alpha has the fix.