diff options
| author | Nathaniel Graham <[email protected]> | 2018-03-25 18:06:46 -0600 |
|---|---|---|
| committer | Nathaniel Graham <[email protected]> | 2018-04-09 17:02:09 -0600 |
| commit | 9536d1170a9ffa787b6a9809b2600c669d60d498 (patch) | |
| tree | c20fe0bd97ca9a37f9533cf8d1bf28bdb2d01140 | |
| parent | b12a7b0f24d5960b0fbf26d7ccc37605c5b03c34 (diff) | |
Select and scroll to the file for "Open path" and "Open Path in New Window" operations
Summary:
After performing a search and using the "Open path" or "Open Path in New Window" present in the context menu, make sure the file is selected and visible in the resulting view.
Cannot implement the same fix for "Open Path in New Tab" because of a limitation in how the contents of inactive tabs are rendered; will need to fix that separately in another patch.
BUG: 377510
Test Plan: Search for an item, and choose {nav Open Path} or {nav Open path in new window}
Reviewers: #dolphin, elvisangelaccio
Reviewed By: #dolphin, elvisangelaccio
Subscribers: elvisangelaccio, broulik
Differential Revision: https://phabricator.kde.org/D11703
| -rw-r--r-- | src/dolphinmainwindow.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 65c57ef7d..b826a3bd2 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -821,10 +821,12 @@ void DolphinMainWindow::openContextMenu(const QPoint& pos, switch (command) { case DolphinContextMenu::OpenParentFolder: changeUrl(KIO::upUrl(item.url())); + m_activeViewContainer->view()->markUrlsAsSelected({item.url()}); + m_activeViewContainer->view()->markUrlAsCurrent(item.url()); break; case DolphinContextMenu::OpenParentFolderInNewWindow: - Dolphin::openNewWindow({KIO::upUrl(item.url())}, this); + Dolphin::openNewWindow({item.url()}, this, Dolphin::OpenNewWindowFlag::Select); break; case DolphinContextMenu::OpenParentFolderInNewTab: |
