]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/places/placespanel.cpp
Select the correct item in places-panel, when a directory is opened.
[dolphin.git] / 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;
 }