1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Dominik Riebeling 2011-03-08 21:05:57 +00:00
parent 4e42cd712c
commit cc6cc53737

View file

@ -289,7 +289,8 @@ RBScene* ParseTreeModel::render(ProjectModel* project,
/* Setting themebase if it can't be derived from the project */ /* Setting themebase if it can't be derived from the project */
if(settings.value("themebase", "") == "" && file && QFile::exists(*file)) if(settings.value("themebase", "") == "" && file && QFile::exists(*file))
{ {
QDir base(*file); QFileInfo wpsfile(*file);
QDir base(wpsfile.canonicalPath());
base.cdUp(); base.cdUp();
settings.insert("themebase", base.canonicalPath()); settings.insert("themebase", base.canonicalPath());
} }