Bug 364208

Summary: "show canvas only" interacts with "show dockers" the wrong way.
Product: [Applications] krita Reporter: Zafio <j>
Component: DockersAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: brunodepaulak, xb_creations
Priority: NOR    
Version: 3.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Patch

Description Zafio 2016-06-11 12:04:39 UTC
Disabling "show dockers", then using "show canvas only" and disabling it to bring the GUI back, results in "show dockers" automatically checked but all dockers actually unchecked.



Reproducible: Always

Steps to Reproduce:
1. Uncheck "Show Dockers" at settings, then press TAB key for "show canvas only"
2. use TAB key again and "Show Dockers" is automatically checked, but all dockers are unchecked/hidden, regardless of the initial configuration.
3.

Actual Results:  
I have to check manually again all dockers that were initially shown.

Expected Results:  
"Shock dockers" should remain unchecked (unless initially checked when entering "canvas only") when exiting "canvas only", and whatever dockers are actually checked, shouldn't be affected.
Comment 1 Odysseas 2016-06-12 20:50:42 UTC
I can confirm this behavior, although not always. I have set my "canvas only" settings  to hide everything but the toolbars and dockers. Sometimes it works as it should, other times I get the above issue.
I haven't managed to find out if I am triggering this..it seems to happen at random.
Comment 2 Bruno P. Kinoshita 2016-12-10 12:22:02 UTC
Can also confirm. I had a look at the code, and looks like when you enter the canvas only mode, it is a toggle operation, that receives a boolean. It is, at the moment, simply switching the Show Dockers check box option.

I created a patch for it, but not sure if I have to use Phabricator. Uploaded it there - https://phabricator.kde.org/differential/diff/8909/ - but really not sure if I did it right. Very first time using Phabricator.

It uses the same approach used for the docker titles, by keeping the previous selection in a configuration. When the user enter the canvas only mode, the value is persisted. Then when the user leaves the canvas only mode, we check set the state to the last known state.

Tested locally after applying the patch, and it seemed to work fine. Hope it helps.

Bruno
Comment 3 Bruno P. Kinoshita 2016-12-10 12:23:08 UTC
Created attachment 102717 [details]
Patch

Attaching the patch here because I have no idea how to use Phabricator yet :)
Comment 4 Halla Rempt 2016-12-10 13:00:08 UTC
Git commit ff0b824d7e046d3349c75dec0462546463f73e06 by Boudewijn Rempt.
Committed on 10/12/2016 at 12:59.
Pushed by rempt into branch 'krita/3.1'.

Patch by Bruno Kinoshita. Thanks!
CCMAIL:brunodepaulak@yahoo.com.br

M  +3    -4    libs/ui/KisMainWindow.cpp
M  +12   -3    libs/ui/KisViewManager.cpp
M  +10   -0    libs/ui/kis_config.cc
M  +3    -0    libs/ui/kis_config.h

https://commits.kde.org/krita/ff0b824d7e046d3349c75dec0462546463f73e06
Comment 5 Halla Rempt 2016-12-10 13:57:47 UTC
Git commit 55ff96a4bcf4dadab7e08ef601dbc87dce16d40c by Boudewijn Rempt.
Committed on 10/12/2016 at 13:57.
Pushed by rempt into branch 'rempt/impex-refactoring'.

Patch by Bruno Kinoshita. Thanks!
CCMAIL:brunodepaulak@yahoo.com.br

M  +3    -4    libs/ui/KisMainWindow.cpp
M  +12   -3    libs/ui/KisViewManager.cpp
M  +10   -0    libs/ui/kis_config.cc
M  +3    -0    libs/ui/kis_config.h

https://commits.kde.org/krita/55ff96a4bcf4dadab7e08ef601dbc87dce16d40c