diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2011-03-08 21:05:57 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2011-03-08 21:05:57 +0000 |
commit | cc6cc53737ffc32ed6a7c6b1e06c9358dcf6b12a (patch) | |
tree | 0a87e7bd262c5ce71800c14e45a57246b792e298 | |
parent | 4e42cd712c6c4bb952efededefc4d6947b52f43b (diff) | |
download | rockbox-cc6cc53737ffc32ed6a7c6b1e06c9358dcf6b12a.tar.gz rockbox-cc6cc53737ffc32ed6a7c6b1e06c9358dcf6b12a.zip |
Fix wrong theme base path when loading a wps.
When loading a wps in the Theme Editor without having a theme cfg loaded
the base path derived from it would be wrong. Make sure to start from
the wps files folder when deriving it. Still assumes the wps file to be
in the standard layout, i.e. in a folder called wps/.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29545 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | utils/themeeditor/models/parsetreemodel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/themeeditor/models/parsetreemodel.cpp b/utils/themeeditor/models/parsetreemodel.cpp index e456797a4d..37ec9b01da 100644 --- a/utils/themeeditor/models/parsetreemodel.cpp +++ b/utils/themeeditor/models/parsetreemodel.cpp | |||
@@ -289,7 +289,8 @@ RBScene* ParseTreeModel::render(ProjectModel* project, | |||
289 | /* Setting themebase if it can't be derived from the project */ | 289 | /* Setting themebase if it can't be derived from the project */ |
290 | if(settings.value("themebase", "") == "" && file && QFile::exists(*file)) | 290 | if(settings.value("themebase", "") == "" && file && QFile::exists(*file)) |
291 | { | 291 | { |
292 | QDir base(*file); | 292 | QFileInfo wpsfile(*file); |
293 | QDir base(wpsfile.canonicalPath()); | ||
293 | base.cdUp(); | 294 | base.cdUp(); |
294 | settings.insert("themebase", base.canonicalPath()); | 295 | settings.insert("themebase", base.canonicalPath()); |
295 | } | 296 | } |