Description: Save locale-dependent preferences on program start
 Otherwise, they will depend on the locale of each individual
 invocation, instead of reusing the paths used at the first
 start, letting users not find their scores.
 Noticed by Natureshadow <dominik.george@teckids.org>
Author: mirabilos <tg@debian.org>
Applied-Upstream: master, commit:b4b2d1281, v3.0

--- a/mscore/preferences.cpp
+++ b/mscore/preferences.cpp
@@ -565,6 +565,17 @@ void Preferences::read()
 //      s.endGroup();
 
       readPluginList();
+
+      // store preferences with locale-dependent default values
+      // so that the values from first start will be used later
+      s.setValue("myScoresPath", myScoresPath);
+      s.setValue("myStylesPath", myStylesPath);
+      s.setValue("myImagesPath", myImagesPath);
+      s.setValue("myTemplatesPath", myTemplatesPath);
+      s.setValue("myPluginsPath", myPluginsPath);
+      s.setValue("mySoundfontsPath", mySoundfontsPath);
+      s.setValue("myExtensionsPath", myExtensionsPath);
+      s.remove("sfPath");
       }
 
 //---------------------------------------------------------
