Bug 375878 - Eraser will not switch back to brush after turning Wacom pen back around
Summary: Eraser will not switch back to brush after turning Wacom pen back around
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (show other bugs)
Version: unspecified
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 375906 376160 376502 377307 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-02-02 00:41 UTC by yuknowmyemailnow
Modified: 2017-03-29 16:42 UTC (History)
26 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
(Video) (558.73 KB, video/mp4)
2017-02-03 17:07 UTC, mvowada
Details
A possible solution for this bug (1.29 KB, patch)
2017-03-12 18:13 UTC, László Fazekas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yuknowmyemailnow 2017-02-02 00:41:32 UTC
On Krita 3.1.2 when I flip my Wacom pen around to my eraser end it switches to the eraser in Krita like normal, but when I flip back to the drawing end of my pen it stays on the eraser and I have to click back to the brush myself. It will do the same thing when I turn my pen around again. The brush side doesn't switch back even after waiting or clicking elsewhere.

I'm on Windows 10. I've also redownloaded and reinstalled 3.1.2 to double check.
Comment 1 kde 2017-02-02 16:51:55 UTC
I have the same issue on my Gentoo Linux. Krita version is also 3.1.2 (i've compiled it on my own with the source provided on version announcement page). My tablet is Wacom Intuos4

If you need any additional information about my setup or some debug logs i can provide.
Comment 2 wolthera 2017-02-02 20:20:59 UTC
*** Bug 375906 has been marked as a duplicate of this bug. ***
Comment 3 aferguson1975 2017-02-02 21:23:42 UTC
I'm having exactly the same issue. Pick a brush, draws fine, flip pen to eraser side, erases fine, flip pen back to pen side, stuck on eraser. Did a clean install of Krita to see if that would fix it but the problem persisted.

OS: Win 10
GPU: NVidia GeForce GTX 960M
CPU: Intel Core i7
RAM: 16GB
Tablet: Wacom Intuos Pen and Touch CTH-480/s
Comment 4 aferguson1975 2017-02-02 21:48:30 UTC
(In reply to aferguson1975 from comment #3)
> I'm having exactly the same issue. Pick a brush, draws fine, flip pen to
> eraser side, erases fine, flip pen back to pen side, stuck on eraser. Did a
> clean install of Krita to see if that would fix it but the problem persisted.
> 
> OS: Win 10
> GPU: NVidia GeForce GTX 960M
> CPU: Intel Core i7
> RAM: 16GB
> Tablet: Wacom Intuos Pen and Touch CTH-480/s

I went back and installed an older version and the problem continued. I had to delete the krita file from AppData to get it to go away.
Comment 5 kde 2017-02-02 22:05:08 UTC
I've removed:

~/.local/share/krita
~/.config/kritashortcutsrc 
~/.config/kritarc 

But it did not helped in my case
Comment 6 Camille Bissuel 2017-02-03 15:07:09 UTC
Confirmed for me with Krita 3.1.2 under Antergos linux with a Cintiq 27...
Like in previous comments, removing Krita config files didn't solve the bug.
Comment 7 mvowada 2017-02-03 17:07:17 UTC
Created attachment 103790 [details]
(Video)

Confirmed also on Ubuntu 14.04 Unity with Krita 1.3.2 Appimage.
Comment 8 Nicholas LaPointe 2017-02-05 03:58:34 UTC
I'm suspicious of commit 21a3682c2508bf3dee04ff77b9966f2f3f00b932 (intended to fix bug 374957 )

This bug appears to be caused by m_currTabletToolID not being updated before the calls to setCurrentPaintop() inside of KisPaintopBox::slotInputDeviceChanged(). Updating it before calling setCurrentPaintop() fixes this bug.
[In case it might be unclear, flipping the pen worked previously because we were using the old m_currTabletToolID to set m_tabletToolMap to the old preset (instead of the new preset).]

I'm not sure that I understand the bug the commit was meant to fix, so I can't tell if this would break it again (and if I am understanding it, it doesn't seem like it got fixed?).
Comment 9 Scott Petrovic 2017-02-06 03:07:41 UTC
I will agree that the problem first starts happening at issue "fix confusion when saving per-stylus presets between sessions". 21a3682c2508bf3dee04

I moved around a few different commits and it seems to start happening there.

clearing your kritarc file seems important with testing this. I originally thought this issues started earlier, only to find out removing my kritarc file before starting got the behavior to be more accurate.
Comment 10 Halla Rempt 2017-02-08 16:22:58 UTC
*** Bug 376160 has been marked as a duplicate of this bug. ***
Comment 11 Nicholas LaPointe 2017-02-15 10:36:25 UTC
*** Bug 376502 has been marked as a duplicate of this bug. ***
Comment 12 loop_shoot 2017-02-17 20:24:43 UTC
(In reply to aferguson1975 from comment #4)
> (In reply to aferguson1975 from comment #3)
> > I'm having exactly the same issue. Pick a brush, draws fine, flip pen to
> > eraser side, erases fine, flip pen back to pen side, stuck on eraser. Did a
> > clean install of Krita to see if that would fix it but the problem persisted.
> > 
> > OS: Win 10
> > GPU: NVidia GeForce GTX 960M
> > CPU: Intel Core i7
> > RAM: 16GB
> > Tablet: Wacom Intuos Pen and Touch CTH-480/s
> 
> I went back and installed an older version and the problem continued. I had
> to delete the Krita file from AppData to get it to go away.

I deleted the Krita file too but now it stays on the basic_tip_default brush instead. And when I press E and flip the pen, it erases but then stays on eraser mode until I choose a new brush again. Blehh
Comment 13 MBM 2017-02-19 16:41:23 UTC
I have the same issue, it's a really annoying bug that made me stop flipping my stylus altogether, impatiently waiting for a bug fix.
Comment 14 William Ethridge 2017-02-19 16:58:37 UTC
chiming in to say I have the same issue. I just made a fresh install of windows 7 and Krita 3.1.2 onto a desktop PC without touching any configs. using a Cintiq Companion Hybrid, the stylus will not properly switch between brushes on the eraser and pen tip sides. 

I do not experience the issue on my laptop running windows 10, however. Are there any logs I could provide for comparison to assist?
Comment 15 Jörn PM 2017-02-24 15:53:49 UTC
I also have this issue on Ubuntu 16.10 with latest git build.
Comment 16 aferguson1975 2017-02-26 06:02:33 UTC
(In reply to thejazzyg from comment #12)
> (In reply to aferguson1975 from comment #4)
> > (In reply to aferguson1975 from comment #3)
> > > I'm having exactly the same issue. Pick a brush, draws fine, flip pen to
> > > eraser side, erases fine, flip pen back to pen side, stuck on eraser. Did a
> > > clean install of Krita to see if that would fix it but the problem persisted.
> > > 
> > > OS: Win 10
> > > GPU: NVidia GeForce GTX 960M
> > > CPU: Intel Core i7
> > > RAM: 16GB
> > > Tablet: Wacom Intuos Pen and Touch CTH-480/s
> > 
> > I went back and installed an older version and the problem continued. I had
> > to delete the Krita file from AppData to get it to go away.
> 
> I deleted the Krita file too but now it stays on the basic_tip_default brush
> instead. And when I press E and flip the pen, it erases but then stays on
> eraser mode until I choose a new brush again. Blehh

Try a completely clean install. Revo Uninstaller is a good tool that cuts down on the work of finding all the areas that may be affected. I misspoke when I said that I deleted the 'Krita file'. What I meant was that I got rid of the folder. For those that don't know where it is, it is C:\Users\<userName>\AppData\Roaming\krita by default on Windows 10.
Comment 17 jdreske 2017-02-26 09:26:16 UTC
same problem on Mac OSX 10.12.
Comment 18 Emmet O'Neill 2017-02-27 23:43:42 UTC
I having this problem on Krita 3.1.2 on Windows 10 using a Wacom Bamboo Tablet and Pen. Just to be clear, I'll be drawing with a 'pencil' brush, flip my pen over to erase, Krita switches to eraser tool as you'd expect, but when I flip my pen back over it doesn't switch back to the pencil brush that I was using.
Comment 19 vikkiknows 2017-03-04 20:54:34 UTC
I have the same problem on my Wacom intuos tablet. I'm using win 10 / Krita  Version 3.1.2 64-bit
Comment 20 Seyl 2017-03-04 23:28:48 UTC
Hoping for a solution as well! I'm using a cintiq and when I flip my pen around, it stays on eraser.
Comment 21 Dmitry Kazakov 2017-03-07 12:55:13 UTC
*** Bug 377307 has been marked as a duplicate of this bug. ***
Comment 22 László Fazekas 2017-03-11 15:57:21 UTC
I have the same problem (ubuntu 16.4). But lately it seems the new master has a different, new behaviour: it remains on stylus even for the eraser. Actually this is better, but I think it's still a bug. I checked the input events and the wacom eraser and stylus QTabletEvents have the same uid value, and they differ only in the pointerType value.

And, when you flip the stylus/eraser the first event arrives with a 0 uid instead of the real one.

Maybe this helps to fix this bug.
Comment 23 László Fazekas 2017-03-12 18:13:18 UTC
Created attachment 104520 [details]
A possible solution for this bug
Comment 24 László Fazekas 2017-03-12 18:25:03 UTC
Please check my attached possible solution. It works fine for me. In my opinion, there are many strange things in the design of this feature. I think its design is over complicated. There is a deadlock: if both LastEraser_%1 and LastPreset_%1 gets the same preset somehow, then there is no way to separate the pen tip and the eraser again. It actually happened to me, both contained the "Eraser_circle" value. I also don't understand how to use more than one stylus with different settings now.
Comment 25 Halla Rempt 2017-03-13 10:02:23 UTC
Git commit 98a0c786310fdfcda488405a6ad098d6e8169120 by Boudewijn Rempt.
Committed on 13/03/2017 at 10:01.
Pushed by rempt into branch 'master'.

Revert "Make the erase mode button follow the blending mode combobox"

This broke flipping the stylus.
Related: bug 348290

This reverts commit f1968fd7f55cda3a08aa0488a3b72d186db565e8.

M  +0    -6    libs/ui/kis_paintop_box.cc

https://commits.kde.org/krita/98a0c786310fdfcda488405a6ad098d6e8169120
Comment 26 Halla Rempt 2017-03-13 10:53:35 UTC
Git commit ad22bab81c3379a467f0d5c8a6423a0165f2cf86 by Boudewijn Rempt.
Committed on 13/03/2017 at 10:34.
Pushed by rempt into branch 'krita/3.1'.

Revert "Make the erase mode button follow the blending mode combobox"

This broke flipping the stylus.
Related: bug 348290

This reverts commit f1968fd7f55cda3a08aa0488a3b72d186db565e8.

M  +0    -6    libs/ui/kis_paintop_box.cc

https://commits.kde.org/krita/ad22bab81c3379a467f0d5c8a6423a0165f2cf86
Comment 27 László Fazekas 2017-03-13 11:19:55 UTC
Hello Boud,

Your correction is good but unfortunately not enough, the preset still remains/returns to Eraser_Circle every time you flip the stylus. I just pushed my solution to the master, I think it's good, but feel free to correct or remove it if there is something wrong.

Btw, Krita repository isn't in Phabricator anymore. Is there a new place for code reviews?
Comment 28 Halla Rempt 2017-03-13 13:21:18 UTC
Oh -- I thought your commit meant my revert should be reverted... Is that not the case? The 'diffusion' url was replaced, but krita is still in phabricator: https://phabricator.kde.org/source/krita/
Comment 29 László Fazekas 2017-03-13 17:00:08 UTC
Hello Boud, in my opinion your commit was actually useful...

When one switches to the eraser, the original version (without your patch) enables "Set eraser mode" on the toolbar. This makes sure that the eraser mode always erases, regardless of the blending mode. Since the eraser switches to a completely customizable preset, I think the user can set this setting manually.

Your patch removed the activation of this switch, which, in my opinion is a good thing. This way the eraser end of the stylus is not only an eraser, but a fully customizable second pen tip.
Comment 30 1995aek 2017-03-22 20:36:22 UTC
so, guys...um...im still having this problem and im an artist who doesnt know much about git or code or program compilation or anything like that.

so heres a dumb-sounding question: where do i download this bug fix so i can finally upgrade from photoshop to krita without this problem?
Comment 31 Halla Rempt 2017-03-22 22:15:43 UTC
It's not in an official release yet. Either use an older version, or use the latest dev build from files.kde.org/krita/3/windows/devbuilds -- if you're on Windows. I haven't made OSX or Linux devbuilds yet.
Comment 32 Bryan McWhirt 2017-03-29 16:42:40 UTC
(In reply to Boudewijn Rempt from comment #31)
> It's not in an official release yet. Either use an older version, or use the
> latest dev build from files.kde.org/krita/3/windows/devbuilds -- if you're
> on Windows. I haven't made OSX or Linux devbuilds yet.

When can we expect an OS X build with the fix?  "older version" can you name a specific version for OS X that works?