┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphintabwidget.cpp
diff options
context:
space:
mode:
authorAlexander Saoutkin <[email protected]>2020-03-01 17:22:46 +0000
committerAlexander Saoutkin <[email protected]>2020-03-01 17:22:46 +0000
commit7a2885853a424042cb631f83a1db278560679d9e (patch)
treec4a7bddf89aa3ca99f3a143410595a93a3f35c13 /src/dolphintabwidget.cpp
parent0bec1518c54c874a7a2c30b5d7d01287513f9b3d (diff)
parentaf45eb0af5219819f76b624162c75da83d763657 (diff)
Merge branch 'release/19.12'
Diffstat (limited to 'src/dolphintabwidget.cpp')
-rw-r--r--src/dolphintabwidget.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp
index 9ecc14427..89c54baf5 100644
--- a/src/dolphintabwidget.cpp
+++ b/src/dolphintabwidget.cpp
@@ -206,6 +206,10 @@ void DolphinTabWidget::openDirectories(const QList<QUrl>& dirs, bool splitView)
} else {
tabPage->secondaryViewContainer()->setActive(true);
}
+ // BUG: 417230
+ // Required for updateViewState() call in openFiles() to work as expected
+ // If there is a selection, updateViewState() calls are effectively a no-op
+ tabPage->activeViewContainer()->view()->clearSelection();
continue;
}
if (splitView && (it != dirs.constEnd())) {
@@ -239,10 +243,14 @@ void DolphinTabWidget::openFiles(const QList<QUrl>& files, bool splitView)
// Select the files. Although the files can be split between several
// tabs, there is no need to split 'files' accordingly, as
// the DolphinView will just ignore invalid selections.
- for (int i = oldTabCount; i < tabCount; ++i) {
+ for (int i = 0; i < tabCount; ++i) {
DolphinTabPage* tabPage = tabPageAt(i);
tabPage->markUrlsAsSelected(files);
tabPage->markUrlAsCurrent(files.first());
+ if (i < oldTabCount) {
+ // Force selection of file if directory was already open, BUG: 417230
+ tabPage->activeViewContainer()->view()->updateViewState();
+ }
}
}