Bug 399419 - Show Painting Assistants toggle is inconsistent between windows
Summary: Show Painting Assistants toggle is inconsistent between windows
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tool/Assistants (show other bugs)
Version: 4.1.3
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Tiar
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2018-10-05 18:56 UTC by Autumn Lansing
Modified: 2021-09-24 13:49 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Image of painting assistant bug (390.37 KB, image/png)
2018-10-09 17:15 UTC, Autumn Lansing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Autumn Lansing 2018-10-05 18:56:40 UTC
When working with multiple windows, toggling the "View > Show Painting Assistants" option becomes confused as to which state each window is in and show inconsistencies.

Toggling off the option on one window to hide the assistants (unchecking the menu option) and then switching to another window where the assistants are not hidden resets the toggle's checkmark in the menu to a global checked state. Switching back to the first window, where the assistants have been hidden, displays the checkmark in the menu next to the option though the assistants themselves are still hidden. Unchecking the option in that state, which one assumes would hide the assistants, shows the assistants instead. The checkmark in the menu ends up being very confusing as you can't rely on its state to tell if the option is off or on.

If it makes a difference, I heavily use sessions.


STEPS TO REPRODUCE
1. Create several windows with painting assistants in each.
2. Toggle off assistants in one window
3. Switch to a second window with assistants not hidden
4. Switch back to the first window with the hidden assistants.
3. Observe the state of the toggle checkmark versus the visible state of the assistants.

OBSERVED RESULT
The toggle checkmark does not consistently match the visibility state.

EXPECTED RESULT
The checkmark should be consistent for each window, showing when the assistants are visible in the window and not showing when they're hidden.
Comment 1 vanyossi 2018-10-06 20:54:12 UTC
I cannot reproduce this in OSX
Comment 2 Halla Rempt 2018-10-09 09:17:35 UTC
Hi Autumn,

I'm also not able to reproduce this, I'm afraid. Using sessions shouldn't be related in any case.
Comment 3 Autumn Lansing 2018-10-09 17:15:20 UTC
Created attachment 115523 [details]
Image of painting assistant bug

Here's an image of the bug. You'll notice that the assistants are visible even though the view option is toggled off.
Comment 4 Halla Rempt 2018-10-09 18:08:45 UTC
Right... But I still don't know how to reproduce it for myself :-). That looks like an interesting comic, btw...
Comment 5 Autumn Lansing 2018-10-10 19:46:11 UTC
Thanks. :) It's currently a work in progress.

I played around with it more today in various scenarios, and the bug happens every single time in the exact way that I described. I'm unsure what might be different in my setup that would cause it. It's not a critical bug, though, by any means. It's just an annoyance. I'll add to the report if I discover any new facts or if it stops happening in a new version.
Comment 6 mvowada 2018-10-10 20:51:12 UTC
(In reply to Boudewijn Rempt from comment #4)
> That
> looks like an interesting comic, btw...

Oh yes, agree :)
Comment 7 Halla Rempt 2018-10-11 09:11:54 UTC
Emmet is going to take a stab at reproducing it.
Comment 8 Tiar 2021-09-22 12:08:36 UTC
Git commit 0da91363b998f02deb309f3581b1a88aa8a61edb by Agata Cacko.
Committed on 22/09/2021 at 11:57.
Pushed by tymond into branch 'master'.

Fix Show Painting Assistants to update correctly

Before this commit, if you opened two files with assistants,
and in one turned the View -> Show Painting Assistants off,
and then switch to the other file and to that same file again,
the View -> Show Painting Assistant would be "on" even though
the painting assistants wouldn't be drawn on the canvas
(only preview would be visible). And then switching it off
would actually turn the drawing of the assistants on.

Another way to reproduce this issue would be to open a new document,
create a new assistant, turn off Show Painting Assistant,
then create a new assistant. Show Painting Assistant now looks "on"
but the drawing of the assistants is still actually off (which is
correct and it's just the checkbox that should stay "off").

This commit fixes this behaviour and now the checkbox in the View menu
reflects correctly the current state of drawing the assistant.
Related: bug 417792

M  +1    -1    libs/ui/KisDecorationsManager.cpp
M  +1    -0    libs/ui/kis_painting_assistants_decoration.cpp

https://invent.kde.org/graphics/krita/commit/0da91363b998f02deb309f3581b1a88aa8a61edb
Comment 9 Tiar 2021-09-24 13:49:17 UTC
Git commit 476806ba2007faaad18df7fc9fa57dd4c3be9290 by Agata Cacko.
Committed on 24/09/2021 at 13:45.
Pushed by tymond into branch 'krita/5.0'.

Fix Show Painting Assistants to update correctly

Before this commit, if you opened two files with assistants,
and in one turned the View -> Show Painting Assistants off,
and then switch to the other file and to that same file again,
the View -> Show Painting Assistant would be "on" even though
the painting assistants wouldn't be drawn on the canvas
(only preview would be visible). And then switching it off
would actually turn the drawing of the assistants on.

Another way to reproduce this issue would be to open a new document,
create a new assistant, turn off Show Painting Assistant,
then create a new assistant. Show Painting Assistant now looks "on"
but the drawing of the assistants is still actually off (which is
correct and it's just the checkbox that should stay "off").

This commit fixes this behaviour and now the checkbox in the View menu
reflects correctly the current state of drawing the assistant.
Related: bug 417792

M  +1    -1    libs/ui/KisDecorationsManager.cpp
M  +1    -0    libs/ui/kis_painting_assistants_decoration.cpp

https://invent.kde.org/graphics/krita/commit/476806ba2007faaad18df7fc9fa57dd4c3be9290