From 2b1906eeeabaf91b856d46e72390ae811747ec39 Mon Sep 17 00:00:00 2001 From: Jin Liu Date: Mon, 19 Aug 2024 11:15:23 +0000 Subject: Fix middle-click not following the "Open archives as folder" setting Previous to this commit middle-clicking an archive would always open it in a new tab. This contradicts the recent change d27ee07de7558470ef7b497fbe3d3504ce7cad07 which made it so middle-click would open an item in the second application that is available to open a file. With this commit, middle-clicking will treat the archive like a folder only when GeneralSettings::browseThroughArchives is enabled or when there is no second application available. Otherwise middle-click will open the archive in the second available application. --- src/views/dolphinview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/views/dolphinview.cpp') diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 85e652ecf..11c0423be 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1120,7 +1120,7 @@ void DolphinView::slotItemsActivated(const KItemSet &indexes) void DolphinView::slotItemMiddleClicked(int index) { const KFileItem &item = m_model->fileItem(index); - const QUrl &url = openItemAsFolderUrl(item); + const QUrl &url = openItemAsFolderUrl(item, GeneralSettings::browseThroughArchives()); const auto modifiers = QGuiApplication::keyboardModifiers(); if (!url.isEmpty()) { // keep in sync with KUrlNavigator::slotNavigatorButtonClicked -- cgit v1.3