[system/dolphin] src: dolphinmainwindow: use base url fallback on slotSelectionChanged

Méven Car <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit f0494fb31a022751457889c3b14d7a406305339b by Méven Car, on behalf of Mike Will.
Committed on 04/08/2026 at 09:40.
Pushed by meven into branch 'master'.

dolphinmainwindow: use base url fallback on slotSelectionChanged

M  +5    -1    src/dolphinmainwindow.cpp

https://invent.kde.org/system/dolphin/-/commit/f0494fb31a022751457889c3b14d7a406305339b

diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index f41be37abd..a29fe0df39 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -406,7 +406,11 @@ void DolphinMainWindow::slotSelectionChanged(const KFileItemList &selection)
     updateFileAndEditActions();
 
     if (m_fileItemActions) {
-        m_fileItemActions->setItemListProperties(KFileItemListProperties(selection));
+        if (selection.count() > 0) {
+            m_fileItemActions->setItemListProperties(KFileItemListProperties(selection));
+        } else {
+            m_fileItemActions->setItemListProperties(KFileItemListProperties(KFileItemList() << m_activeViewContainer->rootItem()));
+        }
     }
 
     const int selectedUrlsCount = m_tabWidget->currentTabPage()->selectedItemsCount();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.