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.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/dolphintabwidget.cpp') diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp index 825ff3c7f..5ad2a368c 100644 --- a/src/dolphintabwidget.cpp +++ b/src/dolphintabwidget.cpp @@ -170,7 +170,7 @@ void DolphinTabWidget::openNewActivatedTab(const QUrl &primaryUrl, const QUrl &s } } -void DolphinTabWidget::openNewTab(const QUrl &primaryUrl, const QUrl &secondaryUrl, DolphinTabWidget::NewTabPosition position) +DolphinTabPage *DolphinTabWidget::openNewTab(const QUrl &primaryUrl, const QUrl &secondaryUrl, DolphinTabWidget::NewTabPosition position) { QWidget *focusWidget = QApplication::focusWidget(); @@ -202,6 +202,7 @@ void DolphinTabWidget::openNewTab(const QUrl &primaryUrl, const QUrl &secondaryU // in background, assure that the previous focused widget gets the focus back. focusWidget->setFocus(); } + return tabPage; } void DolphinTabWidget::openDirectories(const QList &dirs, bool splitView) -- cgit v1.3