]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Select the correct item in places-panel, when a directory is opened.
authorEmmanuel Pescosta <emmanuelpescosta099@gmail.com>
Sat, 18 Aug 2012 13:11:53 +0000 (15:11 +0200)
committerEmmanuel Pescosta <emmanuelpescosta099@gmail.com>
Thu, 23 Aug 2012 20:04:44 +0000 (22:04 +0200)
BUG: 304541
REVIEW: 106074
FIXED-IN: 4.9.1
(cherry picked from commit 1ec8de2c619006e3fe997fbf6074035d65dea6c5)

src/panels/places/placespanel.cpp

index 429c5399a88d7eca195ba519950cbced0e951356..d4450888e076485fdf58640f3b6c48e691eb8ef8 100644 (file)
@@ -62,6 +62,16 @@ PlacesPanel::~PlacesPanel()
 
 bool PlacesPanel::urlChanged()
 {
+    if (!url().isValid() || url().protocol().contains("search")) {
+        // Skip results shown by a search, as possible identical
+        // directory names are useless without parent-path information.
+        return false;
+    }
+
+    if (m_controller) {
+        selectClosestItem();
+    }
+
     return true;
 }