mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
prevent excessive tab opening
Without this, KIO::highlightInFileManager() will open additional tab even if file to be highlighted is already present in current view
This commit is contained in:
parent
7fed7c9777
commit
a4292cf068
|
@ -236,7 +236,7 @@ void DolphinTabWidget::openFiles(const QList<QUrl>& files, bool splitView)
|
||||||
// directories are shown inside one tab (see openDirectories()).
|
// directories are shown inside one tab (see openDirectories()).
|
||||||
QList<QUrl> dirs;
|
QList<QUrl> dirs;
|
||||||
for (const QUrl& url : files) {
|
for (const QUrl& url : files) {
|
||||||
const QUrl dir(url.adjusted(QUrl::RemoveFilename));
|
const QUrl dir(url.adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash));
|
||||||
if (!dirs.contains(dir)) {
|
if (!dirs.contains(dir)) {
|
||||||
dirs.append(dir);
|
dirs.append(dir);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue