]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/folders/folderspanel.cpp
The &-shortcut from another action is not set until the action has been shown at...
[dolphin.git] / src / panels / folders / folderspanel.cpp
index 1dabefd110dd36fe9ca91ed0bedf7b0334b0b58e..fae7ca6a17003cc6841a893b24d9fb2cbad917d8 100644 (file)
@@ -103,17 +103,20 @@ void FoldersPanel::rename(const KFileItem& item)
     }
 }
 
-void FoldersPanel::setUrl(const KUrl& url)
+bool FoldersPanel::urlChanged()
 {
-    if (!url.isValid() || (url == Panel::url())) {
-        return;
+    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;
     }
 
-    Panel::setUrl(url);
     if (m_dirLister != 0) {
         m_setLeafVisible = true;
-        loadTree(url);
+        loadTree(url());
     }
+
+    return true;
 }
 
 void FoldersPanel::showEvent(QShowEvent* event)