Bug 361971 - Canvas Input Settings reset to default on restart.
Summary: Canvas Input Settings reset to default on restart.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Shortcuts and Canvas Input Settings (show other bugs)
Version: 3.0 Alpha
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: release_blocker
Depends on:
Blocks:
 
Reported: 2016-04-19 17:01 UTC by red33ed
Modified: 2016-05-05 11:10 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description red33ed 2016-04-19 17:01:08 UTC
Windows 10 64 bit
Krita 3 alpha portable 

It happens not every time, but very often (1 out of 10 times it works fine). 
Those two settings are resetting:

Settings - Configure Krita - Canvas input settings - Alternate Invocation - Pick Foreground Color from Merged Image - change from Ctrl +Left button to Alt + Left Button

Settings - Configure Krita - Canvas input settings - Change Primary Setting - Activate - change from Shift +Left button to Ctrl + Left Button



Reproducible: Sometimes

Steps to Reproduce:
1. Open Krita 3 alpha portable
2. Go to Settings - Configure Krita - Canvas input settings - Alternate Invocation
3. Change Pick Foreground Color from Merged Image -  from Ctrl +Left button to Alt + Left Button
4. Click ok in Preferences window
5. Exit Krita
6. Start Krita
7. Go to Settings - Configure Krita - Canvas input settings - Alternate Invocation


Actual Results:  
Pick Foreground Color from Merged Image reseted to default Ctrl +Left button

Expected Results:  
Pick Foreground Color from Merged Image stayed Alt +Left button
Comment 1 Halla Rempt 2016-05-02 14:19:38 UTC
Hi,

Thanks for your report! It's a clear regression.
Comment 2 Dmitry Kazakov 2016-05-03 12:15:27 UTC
https://phabricator.kde.org/T2412
Comment 3 Michael 2016-05-05 06:09:58 UTC
This has something to do with KoDefaultPaths. In kis_input_profile_manager.cpp line 246:

// we have one or more entries for this profile name. We'll take the last,
// because that's the most local one.
ProfileEntry entry = profileEntries[profileName].first();


So this assumption no longer holds in Krita 3.0, in fact we keep reloading the builtin profile from ~/share/ instead of the intended profile in ~/.local/. The 1/10 randomness is because the entries may arrive in a different order so that occasionally the first entry is in ~/.local/.
Comment 4 Dmitry Kazakov 2016-05-05 11:10:56 UTC
Git commit d07168fcd08e9e2d048c396c7bf29be4cf96f021 by Dmitry Kazakov.
Committed on 05/05/2016 at 11:09.
Pushed by dkazakov into branch 'master'.

Fix ordering of the resource paths (random resources/tags resets should go now!)

Need help testing on all OS types now! This patch should fix the
random resetting of all the user resources on restarting Krita. It
happened, because Krita randomly tried to load them from the
system-wide settings instead of the local user one

Patch contents:

1) Resources fetched using QStandardPaths::locateAll() should have
   absolute priority over our own paths. That is caused by the fact
   that Qt sorts the returned resources by the usage priority, that is
   ~/.local/* will be first in the list. Whereas our resources are
   usually meant to be system-wide and not writable.

2) For the same reason we should never use QSet over the returned
   resources, since it doesn't preserve ordering

3) This patch should also fix random 'Tags' resetting when restarting
   Krita.
Fixes T2418
CC:kimageshop@kde.org

M  +66   -37   libs/widgetutils/KoResourcePaths.cpp

http://commits.kde.org/krita/d07168fcd08e9e2d048c396c7bf29be4cf96f021