From 15e0c2a98f480f203ce168b6fa9a2e1f2b0ed8f8 Mon Sep 17 00:00:00 2001 From: Akseli Lahtinen Date: Fri, 29 Nov 2024 09:24:55 +0000 Subject: Make "open path" and "open path in new tab" scroll to the selected item **Open Path** When user clicks on "Open Path" after searching for an item, user expects the view to show the item immediately. We wait for the KItemListSmoothScroller to be done with its animation before the scrollbar sizes are being changed. **Open Path in New Tab** When user selects "Open Path in New Tab", we open a new tab to the folder where the file is, then select and set the file current. We need to get the correct tab when opening one, so it has been added as a return value. BUG:495613 --- src/dolphinmainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dolphinmainwindow.cpp') diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 6f23581b4..ead46de30 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -489,9 +489,9 @@ void DolphinMainWindow::addToPlaces() } } -void DolphinMainWindow::openNewTab(const QUrl &url) +DolphinTabPage *DolphinMainWindow::openNewTab(const QUrl &url) { - m_tabWidget->openNewTab(url, QUrl()); + return m_tabWidget->openNewTab(url, QUrl()); } void DolphinMainWindow::openNewTabAndActivate(const QUrl &url) -- cgit v1.3