Bug 364208 - "show canvas only" interacts with "show dockers" the wrong way.
Summary: "show canvas only" interacts with "show dockers" the wrong way.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Dockers (show other bugs)
Version: 3.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-11 12:04 UTC by Zafio
Modified: 2016-12-10 13:57 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch (3.39 KB, patch)
2016-12-10 12:23 UTC, Bruno P. Kinoshita
Details

Note You need to log in before you can comment on or make changes to this bug.
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