Bug 399648 - Brush preset changing when creating second document + close it + lift the pen?
Summary: Brush preset changing when creating second document + close it + lift the pen?
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Filters (other bugs)
Version First Reported In: git master (please specify the git hash!)
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-11 09:08 UTC by mvowada
Modified: 2018-11-20 08:57 UTC (History)
2 users (show)

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


Attachments
(Video example) (1.90 MB, video/mp4)
2018-10-11 09:18 UTC, mvowada
Details
(Tablet log) (429.33 KB, text/plain)
2018-10-11 09:19 UTC, mvowada
Details
(Video example 1) (612.41 KB, video/mp4)
2018-11-05 08:41 UTC, mvowada
Details
(Video example 2) (357.67 KB, video/mp4)
2018-11-05 08:41 UTC, mvowada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mvowada 2018-10-11 09:08:22 UTC
(Krita 4.2.0-pre-alpha (git 4a0b033) - Ubuntu 14.04 LTS, Unity)

In tabs mode try to (see video):

    1. "CTRL + N" twice
    2. "CTRL + W" (it closes the 2nd document)
    3. lift the pen
    4. paint

Actual Results: the brush preset changes sometimes
Expected Results: brush preset shouldn't change
Comment 1 mvowada 2018-10-11 09:18:37 UTC
Created attachment 115557 [details]
(Video example)

(forgot to attach the video)
Comment 2 mvowada 2018-10-11 09:19:19 UTC
Created attachment 115558 [details]
(Tablet log)

(tablet log)
Comment 3 David REVOY 2018-10-11 10:28:53 UTC
After discussion with Boud on IRC; I join this 57s video about brush-preset switch to this thread:

[video, 57s, webm, 8MB] https://share.kde.org/index.php/s/TMF9JYiRw3Arf2r
Comment 4 mvowada 2018-10-11 11:00:37 UTC
Thanks David, very clear video and explanation of the problem (https://bugs.kde.org/attachment.cgi?id=115557).
Another way for me to hit the bug (https://forum.kde.org/viewtopic.php?f=139&t=154074#p404155):

    1. pick a different brush preset
    2. restart
    3. move out/in the viewport (or just lift the pen)
Comment 5 mvowada 2018-10-12 12:53:27 UTC
(Confirming)
Comment 6 Scott Petrovic 2018-11-02 01:01:57 UTC
Git commit d4a5b872deb55378d0cbf2687f69759c8028f181 by Scott Petrovic.
Committed on 02/11/2018 at 01:01.
Pushed by scottpetrovic into branch 'master'.

M  +5    -2    libs/ui/KisViewManager.cpp

https://commits.kde.org/krita/d4a5b872deb55378d0cbf2687f69759c8028f181
Comment 7 Scott Petrovic 2018-11-02 01:04:49 UTC
I just fixed some weirdness in a very similar situation that mvowda had when changing views. 

I couldn't get the issue that David was experiencing, but it could be related to what I fixed.

The issue I fixed was that when setting a view, Krita would load the last preset from the kritarc file. The only time it would set that last preset is when the view manager was destroyed, which doesn't seem to be nearly enough.

Re-open this ticket if it is still giving anyone issues.
Comment 8 David REVOY 2018-11-02 03:46:32 UTC
@Scott: Thank you for investigating this problem! I'll compile master and I'll give feedback if it improves the situation I was experiencing. Now Pepper&Carrot ep27 is released (btw, thanks for your comment about it) I can go back to beta-testing mode.
Comment 9 mvowada 2018-11-02 17:11:18 UTC
(In reply to Scott Petrovic from comment #7)
> Re-open this ticket if it is still giving anyone issues.
It seems fixed here. Thank you!
Comment 10 mvowada 2018-11-05 08:40:11 UTC
(Krita 4.2.0-pre-alpha (git d4a5b87) - ubuntu 14.04, Unity)

Hi. Unfortunately it seems there're still a couple of issues (see video below):

    1. fresh configs
    2. "CTRL + N"
    3. paint strokes
    4. pick another brush preset
    5. paint strokes
    6. lift the pen

Actual Results: the brush preset changes back to the previous used.

---
Similarly, another issue (see 2nd video below):

    1. fresh configs
    2. "CTRL + N"
    3. pick another brush preset
    4. paint strokes
    5. save and close
    6. reopen the saved document

Actual Results: the brush preset is the default one (lifting the pen it changes to the last used).
Expected: present the last used preset.
Comment 11 mvowada 2018-11-05 08:41:19 UTC
Created attachment 116095 [details]
(Video example 1)
Comment 12 mvowada 2018-11-05 08:41:52 UTC
Created attachment 116096 [details]
(Video example 2)
Comment 13 Scott Petrovic 2018-11-05 12:27:55 UTC
thanks for the update mvowda

I spent a bit of time trying to test those two scenarios and I can't get either one of those to happen. The whole "lifting the pen" that would make the bug happen is especially puzzling for me. On my distro (Ubuntu 18.04.1), the preset code doesn't run at all if I lift my pen. It shouldn't run, so I am not sure why it is activating on your version.

Another developer might need to test this on their distro. It is possible that there was a bug fixed at some point between Ubuntu 14.04 and 18.04 as well.
Comment 14 Scott Petrovic 2018-11-05 12:29:40 UTC
does the clean kritarc file make a difference. Maybe you could elaborate more about that. That could give clues. If the kritarc is not fresh, will the bug go away?
Comment 15 mvowada 2018-11-05 14:29:18 UTC
Hi Scott, thanks for checking.
(In reply to Scott Petrovic from comment #14)
> does the clean kritarc file make a difference. Maybe you could elaborate
> more about that. That could give clues
    - If I remove the krita folder and the "kritarc" file before starting Krita, I'm able to reproduce the issues. 
    - If the kritarc is not fresh, then I'm not able to reproduce the issues.
    - if the "kritarc" file is not fresh and I open a file that was saved using a previous build, I'm able to reproduce the issue again.
Comment 16 mvowada 2018-11-13 10:02:47 UTC
Hi Scott, 
after re-checking with the latest 4.2.0-pre-alpha (git 98de1e6) I'm not able to reproduce the issue anymore.
I don't know if anything changed in the meanwhile or maybe I was mistaken, for me the issue is now solved. 
Thanks for helping
Comment 17 Scott Petrovic 2018-11-15 14:54:11 UTC
Thanks for letting me know. If any other issues come about, you can open up a new ticket. I am sure it will be a bit different than this one.
Comment 18 Halla Rempt 2018-11-20 08:57:22 UTC
Git commit dee63d46b421a9658d97d94e24c68c9484b4e2de by Boudewijn Rempt, on behalf of Scott Petrovic.
Committed on 20/11/2018 at 08:25.
Pushed by rempt into branch 'krita/4.1'.

M  +5    -2    libs/ui/KisViewManager.cpp

https://commits.kde.org/krita/dee63d46b421a9658d97d94e24c68c9484b4e2de