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 /utils | |
| parent | 4e42cd712c6c4bb952efededefc4d6947b52f43b (diff) | |
| download | rockbox-cc6cc53737ffc32ed6a7c6b1e06c9358dcf6b12a.zip rockbox-cc6cc53737ffc32ed6a7c6b1e06c9358dcf6b12a.tar.gz rockbox-cc6cc53737ffc32ed6a7c6b1e06c9358dcf6b12a.tar.bz2 rockbox-cc6cc53737ffc32ed6a7c6b1e06c9358dcf6b12a.tar.xz | |
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
Diffstat (limited to 'utils')
| -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 e456797..37ec9b0 100644 --- a/utils/themeeditor/models/parsetreemodel.cpp +++ b/utils/themeeditor/models/parsetreemodel.cpp @@ -289,7 +289,8 @@ RBScene* ParseTreeModel::render(ProjectModel* project, /* Setting themebase if it can't be derived from the project */ if(settings.value("themebase", "") == "" && file && QFile::exists(*file)) { - QDir base(*file); + QFileInfo wpsfile(*file); + QDir base(wpsfile.canonicalPath()); base.cdUp(); settings.insert("themebase", base.canonicalPath()); } |