Bug 491292

Summary: Toggling eraser mode behavior set from the keyboard shortcut is not switching to eraser brush preset
Product: [Applications] krita Reporter: Khabibullah Baaj <addibbaaj>
Component: Shortcuts and Canvas Input SettingsAssignee: Krita Bugs <krita-bugs-null>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.2.3   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Khabibullah Baaj 2024-08-05 08:44:32 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
Toggling eraser mode from custom shortcut is not toggling brush preset from any random brush to eraser brush.

STEPS TO REPRODUCE
1.  Enable toggle eraser mode shortcut by going to Setting > Configure Krita > Keyboard Shortcut > Search: Toggle Eraser Preset. I set it to "\" and "Shift + E"
2. Select any other brush than brush you used currently
3.  Press the keyboard shortcut that has been set. In my case I press "Shift + E"
4. It turn into the second last used brush preset, not eraser preset. Note that I know it is different from Set Eraser Mode, which is "E" shortcut by default

OBSERVED RESULT
The shortcut results in switching back to last used brush preset. I feel like it is the same result for "Toggle previous preset" instead. I can say that because I tried to use eraser preset first and then my current used brush, when I press the shortcut I set, it result in the eraser preset that I use.

EXPECTED RESULT
The shortcut should result in switching to eraser brush preset, not last used brush preset. 

SOFTWARE/OS VERSIONS
Windows: 11 Home
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma:  -
KDE Plasma Version: -
KDE Frameworks Version: -
Qt Version: -

Sorry I can't post the debug information from Krita since when I tried to paste it here, the web reporting page is not responding and when I submitted the bug it is returning with error of 65000 character limit. I can provide it upon request.