summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/browsedirtree.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2007-08-08 23:23:28 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2007-08-08 23:23:28 +0000
commit0fc30fbea52bba5ce8da422ffa9777e50db6a1dd (patch)
tree322d3d28e2a6f3f696b00c2eb423c8ba6796c79b /rbutil/rbutilqt/browsedirtree.cpp
parentf3498db0d4d30c807d6517cc6d5675fdf9eb32c4 (diff)
downloadrockbox-0fc30fbea52bba5ce8da422ffa9777e50db6a1dd.tar.gz
rockbox-0fc30fbea52bba5ce8da422ffa9777e50db6a1dd.tar.bz2
rockbox-0fc30fbea52bba5ce8da422ffa9777e50db6a1dd.zip
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
Diffstat (limited to 'rbutil/rbutilqt/browsedirtree.cpp')
-rw-r--r--rbutil/rbutilqt/browsedirtree.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/browsedirtree.cpp b/rbutil/rbutilqt/browsedirtree.cpp
index e100dfa41f..c8203e1821 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);