D27389: Fix files not being highlighted if directory of file is already open

Kai Uwe Broulik noreply at phabricator.kde.org
Fri Feb 14 09:09:58 GMT 2020


broulik added inline comments.

INLINE COMMENTS

> dolphintabwidget.cpp:242
>      // 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);

I think we don't want to change existing tabs, only thew new ones.
You probably want to check

  if (tabCount > oldTabCount) {
     // use this loop
  } else {
    // set active on the tab it now selected for us
  }

> dolphinview.cpp:213
>  {
> +    updateViewState(); // BUG: 417230
>      if (active == m_active) {

`updateViewState()` resets state once it processed it, right? i.e. I want to avoid changing between views and tabs to randomly scroll back to whatever file it was once asked to highlight.

I don't like abusing this method for this.

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D27389

To: feverfew, broulik
Cc: kfm-devel, pberestov, iasensio, fprice, MrPepe, fbampaloukas, alexde, Codezela, feverfew, meven, spoorun, navarromorales, firef, ngraham, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20200214/24fbe165/attachment.htm>


More information about the kfm-devel mailing list