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/dolphintabwidget.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/dolphintabwidget.h') diff --git a/src/dolphintabwidget.h b/src/dolphintabwidget.h index a28a6bea1..52d3fd626 100644 --- a/src/dolphintabwidget.h +++ b/src/dolphintabwidget.h @@ -132,10 +132,11 @@ public Q_SLOTS: /** * Opens a new tab in the background showing the URL \a primaryUrl and the * optional URL \a secondaryUrl. + * @return A pointer to the opened DolphinTabPage. */ - void openNewTab(const QUrl &primaryUrl, - const QUrl &secondaryUrl = QUrl(), - DolphinTabWidget::NewTabPosition position = DolphinTabWidget::NewTabPosition::FollowSetting); + DolphinTabPage *openNewTab(const QUrl &primaryUrl, + const QUrl &secondaryUrl = QUrl(), + DolphinTabWidget::NewTabPosition position = DolphinTabWidget::NewTabPosition::FollowSetting); /** * Opens each directory in \p dirs in a separate tab unless it is already open. -- cgit v1.3