]> cloud.milkyroute.net Git - dolphin.git/commit
Fix files not being highlighted if directory of file is already open
authorAlexander Saoutkin <a.saoutkin@gmail.com>
Sun, 1 Mar 2020 16:31:02 +0000 (16:31 +0000)
committerAlexander Saoutkin <a.saoutkin@gmail.com>
Sun, 1 Mar 2020 17:17:20 +0000 (17:17 +0000)
commitfef7eebc6e3c27e6653bfd5d8a1abec191dc9835
treeacaad4ead0656803f71418c4de30b7f508e5d5a6
parent270ab975fba5b97f50e8a51c91254159bd549d32
Fix files not being highlighted if directory of file is already open

Summary:
In DolphinTabWidget::openFiles it assumes openDirectories will open new tabs, so it
only marks the URL selection for the newly opened tabs. This assumption is incorrect
 as Dolphin might reuse tabs when the folder is already open.

Even then, markUrlsAsSelected does nothing when the folder is already opened.
The selection seems to only be used when the folder finishes loading, calls made after
that only change a variable without updating the actual selection.

A call to DolphinView::updateViewState() is required to restore the intended behaviour, so long as DolphinView::clearSelection() has been called on the relevant tab, otherwise updateViewState() is a no-op.

BUG: 417230
FIXED-IN: 19.12.3

Test Plan:
1. In any application that has an "open containing folder" select that option
2. and then do the same for another file in the same folder

Reviewers: broulik

Reviewed By: broulik

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D27389
src/dolphintabwidget.cpp
src/views/dolphinview.h