diff options
| author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2007-08-08 23:23:28 +0000 |
|---|---|---|
| committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2007-08-08 23:23:28 +0000 |
| commit | 0fc30fbea52bba5ce8da422ffa9777e50db6a1dd (patch) | |
| tree | 322d3d28e2a6f3f696b00c2eb423c8ba6796c79b | |
| parent | f3498db0d4d30c807d6517cc6d5675fdf9eb32c4 (diff) | |
| download | rockbox-0fc30fbea52bba5ce8da422ffa9777e50db6a1dd.zip rockbox-0fc30fbea52bba5ce8da422ffa9777e50db6a1dd.tar.gz rockbox-0fc30fbea52bba5ce8da422ffa9777e50db6a1dd.tar.bz2 rockbox-0fc30fbea52bba5ce8da422ffa9777e50db6a1dd.tar.xz | |
don't try to find the given file in the browser dialog if it doesn't exist.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14249 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | rbutil/rbutilqt/browsedirtree.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/browsedirtree.cpp b/rbutil/rbutilqt/browsedirtree.cpp index e100dfa..c8203e1 100644 --- a/rbutil/rbutilqt/browsedirtree.cpp +++ b/rbutil/rbutilqt/browsedirtree.cpp @@ -40,10 +40,10 @@ void BrowseDirtree::setDir(QDir &dir) { qDebug() << "BrowseDirtree::setDir()" << model.index(dir.absolutePath()); + // do not try to hilight directory if it's not valid. + if(!dir.exists()) return; // hilight the set directory if it's valid if(model.index(dir.absolutePath()).isValid()) { - model.index(dir.absolutePath()).parent(); - QModelIndex p = model.index(dir.absolutePath()); ui.tree->setCurrentIndex(p); ui.tree->scrollTo(p); |