D15840: [Folder View] Remember selected item when navigating in subfolders

Eike Hein noreply at phabricator.kde.org
Tue Oct 9 00:48:28 BST 2018


hein added inline comments.

INLINE COMMENTS

> FolderView.qml:1119
> +                    setSelected(positioner.map(gridView.currentIndex));
> +                    gridView.contentY = Math.min(lastPosition.contentY, gridView.contentY);
>                  }

I don't think this works as intended. It means "only change to this contentY if it's lower than the current contentY".

I'm not really happy with the use of contentY to begin with, though, unfortunately. The problem is that contentY isn't really something that's a good idea to store permanently, because it's relative to originY, and originY can change arbitrarily depending on things like delegate inseration/removal outside the viewport, which can depend on the number of items in the model.

Could you try using the normalized values in gridView.visibleArea.* instead? If you use visibleArea.yPosition you can even forego the bounds check since it can't be out of bounds.

REPOSITORY
  R119 Plasma Desktop

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

To: thsurrel, #plasma, broulik, hein
Cc: anthonyfieroni, ngraham, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20181008/cf6d2610/attachment.html>


More information about the Plasma-devel mailing list