pencil
pencil copied to clipboard
[BUG ] Eraser Tool Toggle - Keyboard Shortcut Behaviour
--Issue Overview--
All of the following behaviours are part of the same issue that stems from how Pencil2D handles the eraser tool toggle or "invocation" when using any tool including itself.
A) "Tool Toggle Lock"
--Steps to reproduce--
- Select drawing tool (i.e. Pencil Tool)
- Draw a line to activate the drawing state and to use as reference
- Press & hold CTRL+ SHIFT to invoke the eraser mode
- While holding CTRL+SHIFT press ANY OTHER KEY (i.e F1)
- the eraser will be "toggle locked" as the current tool (it will essentially become the active tool), while the previously used tool icon (i.e Pencil Tool) will continue to display a “pressed down” state.
B) Using Size slider while holding CTRL+SHIFT will toggle lock the eraser tool
- Select any drawing tool
- Press & Hold CTRL + SHIFT
- Without releasing the keyboard shortcut, click on any of the "invoked eraser tool" sliders or pressure sensitivity checkbox.
--Expected Results (A & B)--
- The Icon should change to the currently active tool when the "toggle" is temporary.
- The tool being invoked should never become "locked", that is to change permanently, after using a "temporary toggle" function unless there is a specific condition (e.g timer, etc)
- The tool should not toggle permanently after changing it's size or feathering sliders, or it's pressure sensitivity state.
C) Eraser Tool Size Controlled by Keyboard Shortcut Combination
--Steps to reproduce--
- Select any tool, even the eraser tool itself.
- Press & Hold CTRL + SHIFT + ANY KEY (e.g. CTRL+SHIFT+F1)
- Every time the shortcut is pressed or if you add any other keymap, the size of the eraser tool will increase until it reaches it’s maximum size (200px). The eraser tool size increases depending of the pixel size of the currently selected tool according to this table:
--Expected Results (C)-- CTRL+SHIFT Invocation shouldn't modify the eraser tool size by any mean.
D) Keyboard Shortcut State Freeze After using Options
--Steps to reproduce--
- Select any tool
- In the options panel use either: The size slider, feather slider or press the pressure checkbox that is available for the active tool.
- Press & Hold CTRL+SHIFT to invoke the eraser tool once;
- Eraser tool is not invoked
- Draw or click on the canvas again
- Press & Hold CTRL+ SHIFT
- Tool Invoke works once again
--Expected Results (D)-- Using any slider, checkbox or number box should NOT affect how keyboard shortcuts work at any time. So regardless of what you're clicking the tool invoke should work every time.
--System Information-- Pencil2D Nightly Build 15 Jan 2016 Windows 7 64bits SP1 ATI Radeon HD 6770 1GB AMD Phenom II X4 965 BE 3.4 GHZ 4 GB RAM
I fixed it here : https://github.com/pencil2d/pencil/pull/470
@feeef You're awesome man! I'll try it out once it's merged so I can close this.
@Jose-Moreno
I have checked all the steps you provided here and I found everything is OK on my system
Still, about the D step, at first I thought you got a point (I mean I "managed" to get the same behaviour as yours when activating a fast tool. But I soon realized that if that is considered to be something related to an Issue than we still have the HAND tool, which behaves the same way the other fast tools behaves.
The others A B C lines worked OK Hope to have understood your post correctly.
And if that is the case that everything is OK now, you can close this post ;) Try the hand tool and check if that is the same case of your D line ;)
Thank you for your work!
[2018 Review] I'm leaving an update for this bug. So far in the latest nightly build, I can confirm that case A and C are somewhat fixed, however this introduced an annoying issue where using CTR+SHIFT+Z will sometimes fail to invoke the REDO command, so you have to use the edit menu and force the redo for it to work again. Case B and D are still behaving in the same way as described.
@chchwy A few questions on this bug:
- Can we remove this hardcoded shortcut to invoke the eraser and make it part of the shortcut list?
- Can we allow this behaviour to be invoked while holding the same key for the eraser (E key), this would make it similar to Toonboom and that way we can get rid of the annoying issue with the REDO procedure I described before and not have to consider more than one key
Hi I've re-tested this report on commit: 91b1721baef012d49cffd0d23358524a420af9fd
- Case A & C were fixed ✅
- Case B & D remain the same 🤔 however I think these cases could be isolated as a separate issue because it seems the problem is related to the tab focus priority that each component has and not to the temp tool manager that was refactored
Quite frankly, it's a larger and yet more nuanced issue in usability that certain buttons get stuck awaiting for tab cycling input, but it might not be a real bug in the sense that it is damaged (cases B & D)
I'll open a new issue with those cases (or look if there's an existing issue that fits the criteria) and close this one. Thanks!