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

Méven Car <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit d14cc1cac92758d53335c1c5de6409b9e84ba454 by Méven Car.
Committed on 07/08/2026 at 13:54.
Pushed by meven into branch 'release/26.08'.

dolphinmainwindow: use base url fallback on slotSelectionChanged


(cherry picked from commit f0494fb31a022751457889c3b14d7a406305339b)

Co-authored-by: Mike Will <[email protected]>

M  +5    -1    src/dolphinmainwindow.cpp

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

diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 51fec82475..317b2992c7 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.