Bug 455846

Summary: zoom rotate move does not work (with touchpad and touch)
Product: [Applications] krita Reporter: Adam Belis <adam.belis>
Component: * UnknownAssignee: sh_zam <shzam>
Status: RESOLVED FIXED    
Severity: normal CC: halla, shzam
Priority: NOR    
Version First Reported In: 5.1.0-beta1   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Adam Belis 2022-06-23 13:26:08 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1.  opem krita and empty file
2.   put two fingers together and spread them on touchpad or screen
3. 

OBSERVED RESULT
 nothing

EXPECTED RESULT
 zoom rotate move

SOFTWARE/OS VERSIONS
Windows:  win 10  
surface pro 4
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Adam Belis 2022-07-17 18:14:19 UTC
bug is stil therre in beta2
Comment 2 Bug Janitor Service 2022-07-20 15:44:32 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1525
Comment 3 Adam Belis 2022-07-20 15:51:18 UTC
Sombody suggested that i play with new canvas settings. After cahngeing presetrs few times and resetting them it started working so it seems like shorcut migrating  was not done correctly for users who update
Comment 4 sh_zam 2022-07-20 15:56:40 UTC
Hence the patch :)
Comment 5 sh_zam 2022-08-09 07:14:11 UTC
Git commit cc8f304a7da266b909d70104ce0d9de7aee7f3b8 by Sharaf Zaman.
Committed on 09/08/2022 at 06:06.
Pushed by szaman into branch 'master'.

Make Krita's canvas input profile migrate-able from version 5 to 6

The porting (PROFILE_VERSION - 1) to PROFILE_VERSION works as something
like this, with entry point being loadProfile():

1. We fill two lists, `profileEntries`: one with profiles with profile version being
PROFILE_VERSION, `profileEntriesToMigrate`: one with profiles with version
being (PROFILE_VERSION - 1).

2. We go through the list we want to migrate and check if there is a
corresponding version of it in `profileEntries` and that has to exist in
user-local directory (not in install location -- which is the profile
version we ship).

        a. If there doesn't exist one, we migrate the profile entry. And
        remove it from `profileEntriesToMigrate`.
        b. If there exists one (which isn't in user-local), we don't
        migrate.

3. Once we get what we have to migrate and what we don't. We invoke
`KisInputProfileMigrator` to migrate the entries and because it will
change how you want to carry out migration, it is an abstract class.

       a. Currently we invoke `KisInputProfileMigrator5To6`, which
       handles the migration where we have need to import only the new
       touch shortcuts.

4. Once we've migrated, we copy the old file to same directory with
version number suffix added to the filename -- this old file is what
will be loaded by the old version of Krita if it ever is opened.

5. That's all, at this point we can save the new profile at the location
where the old version was.
Related: bug 457514

M  +1    -1    krita/data/input/kritadefault.profile
M  +1    -1    krita/data/input/painttoolsaicompatible.profile
M  +1    -1    krita/data/input/photoshopcompatible.profile
M  +1    -0    libs/ui/CMakeLists.txt
A  +105  -0    libs/ui/input/KisInputProfileMigrator.cpp     [License: LGPL(v2.0+)]
A  +65   -0    libs/ui/input/KisInputProfileMigrator.h     [License: LGPL(v2.0+)]
M  +109  -53   libs/ui/input/kis_input_profile_manager.cpp
M  +7    -0    libs/ui/input/kis_input_profile_manager.h

https://invent.kde.org/graphics/krita/commit/cc8f304a7da266b909d70104ce0d9de7aee7f3b8
Comment 6 sh_zam 2022-08-09 08:06:16 UTC
Git commit 6346889b7d9f7e7f988f48896af333204df9d306 by Sharaf Zaman.
Committed on 09/08/2022 at 07:42.
Pushed by szaman into branch 'krita/5.1'.

Make Krita's canvas input profile migrate-able from version 5 to 6

The porting (PROFILE_VERSION - 1) to PROFILE_VERSION works as something
like this, with entry point being loadProfile():

1. We fill two lists, `profileEntries`: one with profiles with profile version being
PROFILE_VERSION, `profileEntriesToMigrate`: one with profiles with version
being (PROFILE_VERSION - 1).

2. We go through the list we want to migrate and check if there is a
corresponding version of it in `profileEntries` and that has to exist in
user-local directory (not in install location -- which is the profile
version we ship).

        a. If there doesn't exist one, we migrate the profile entry. And
        remove it from `profileEntriesToMigrate`.
        b. If there exists one (which isn't in user-local), we don't
        migrate.

3. Once we get what we have to migrate and what we don't. We invoke
`KisInputProfileMigrator` to migrate the entries and because it will
change how you want to carry out migration, it is an abstract class.

       a. Currently we invoke `KisInputProfileMigrator5To6`, which
       handles the migration where we have need to import only the new
       touch shortcuts.

4. Once we've migrated, we copy the old file to same directory with
version number suffix added to the filename -- this old file is what
will be loaded by the old version of Krita if it ever is opened.

5. That's all, at this point we can save the new profile at the location
where the old version was.
Related: bug 457514
(cherry picked from commit cc8f304a7da266b909d70104ce0d9de7aee7f3b8)

M  +1    -1    krita/data/input/kritadefault.profile
M  +1    -1    krita/data/input/painttoolsaicompatible.profile
M  +1    -1    krita/data/input/photoshopcompatible.profile
M  +1    -0    libs/ui/CMakeLists.txt
A  +105  -0    libs/ui/input/KisInputProfileMigrator.cpp     [License: LGPL(v2.0+)]
A  +65   -0    libs/ui/input/KisInputProfileMigrator.h     [License: LGPL(v2.0+)]
M  +109  -53   libs/ui/input/kis_input_profile_manager.cpp
M  +7    -0    libs/ui/input/kis_input_profile_manager.h

https://invent.kde.org/graphics/krita/commit/6346889b7d9f7e7f988f48896af333204df9d306