]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinview.cpp
* Ignore invalid redirection after renaming an expanded folder in detail view.
[dolphin.git] / src / dolphinview.cpp
index 1c06f560c5fe6e4e080c8c424af40d7bba574e85..e73766d242fc1df98ff618e7d078bfe7f272631b 100644 (file)
@@ -1105,7 +1105,8 @@ void DolphinView::slotDirListerCompleted()
 
     if (!m_newFileNames.isEmpty()) {
         // select all newly added items created by a paste operation or
-        // a drag & drop operation
+        // a drag & drop operation, and clear the previous selection
+        m_viewAccessor.itemView()->clearSelection();
         const int rowCount = m_viewAccessor.proxyModel()->rowCount();
         QItemSelection selection;
         for (int row = 0; row < rowCount; ++row) {
@@ -1545,8 +1546,10 @@ KDirLister* DolphinView::ViewAccessor::dirLister() const
 
 void DolphinView::slotRedirection(const KUrl& oldUrl, const KUrl& newUrl)
 {
-    emit redirection(oldUrl, newUrl);
-    m_viewModeController->redirectToUrl(newUrl); // #186947
+    if (oldUrl.equals(url(), KUrl::CompareWithoutTrailingSlash)) {
+        emit redirection(oldUrl, newUrl);
+        m_controller->redirectToUrl(newUrl); // #186947
+    }
 }
 
 void DolphinView::restoreContentsPosition()