]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Only select a created item and make it 'current' in the active view
authorFrank Reininghaus <frank78ac@googlemail.com>
Sun, 18 Nov 2012 15:22:52 +0000 (16:22 +0100)
committerFrank Reininghaus <frank78ac@googlemail.com>
Sun, 18 Nov 2012 15:22:52 +0000 (16:22 +0100)
The 'make the new item the current one in all views' issue has been
around for quite some time, the unexpected selection was a recent
regression caused by commit b25059e803e7eed54f0593605a4066882d63bce2.

Thanks to Jaime Torres for finding the regression early and for testing
this patch!

BUG: 310219
FIXED-IN: 4.9.4

src/views/dolphinview.cpp

index c4fe2d330d1f7b122f79f748e490af919a79e972..13db9896e66ae83f616ead6f46653e6dc9a6da01 100644 (file)
@@ -1173,8 +1173,11 @@ QString DolphinView::viewPropertiesContext() const
 
 void DolphinView::observeCreatedItem(const KUrl& url)
 {
-    markUrlAsCurrent(url);
-    markUrlsAsSelected(QList<KUrl>() << url);
+    if (m_active) {
+        clearSelection();
+        markUrlAsCurrent(url);
+        markUrlsAsSelected(QList<KUrl>() << url);
+    }
 }
 
 void DolphinView::slotDirectoryRedirection(const KUrl& oldUrl, const KUrl& newUrl)