Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Some Virtualizing List Update Bugs #13795

Merged
merged 3 commits into from
Dec 2, 2023

Conversation

grokys
Copy link
Member

@grokys grokys commented Dec 1, 2023

What does the pull request do?

  • Fix a couple of off-by-N errors in RealizedStackElements when items are inserted or removed, and add tests for these cases
  • When a Replace is carried out, don't implement it using a remove and an insert. It's much simpler to just unrealize the element.

Fixed issues

Fixes #11666 (and probably more, need to check)

@grokys grokys added bug backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Dec 1, 2023
@grokys grokys changed the title Fix Sore Virtualizing List Update Bugs Fix Some Virtualizing List Update Bugs Dec 1, 2023
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.1.999-cibuild0042558-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@robloo
Copy link
Contributor

robloo commented Dec 1, 2023

This might be related to the issues with collection changes not reflecting properly in the displayed list that has been elusive for me to track down and understand. I see that in a real app but am unable to repro so far in a simple test cases (though I forgot to check insert). I'm going to re-run with this package and see if that fixes things.

@maxkatz6 maxkatz6 added this pull request to the merge queue Dec 2, 2023
Merged via the queue into master with commit 3725f0d Dec 2, 2023
7 checks passed
@maxkatz6 maxkatz6 deleted the fixes/11666-virtualizing-list-update-bugs branch December 2, 2023 07:22
maxkatz6 pushed a commit that referenced this pull request Dec 5, 2023
* Added failing unit tests for #11666.

* Handle items replaced with its own logic.

Don't rely on a remove/insert - it creates more work than needed.

* Fix some off-by-N errors in RealizedStackElements.

Fixes #11666
@maxkatz6 maxkatz6 added backported-11.0.x and removed backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Dec 5, 2023
grokys added a commit to AvaloniaUI/Avalonia.Controls.TreeDataGrid that referenced this pull request Dec 7, 2023
Port fixes to `RealizedStackElements` from AvaloniaUI/Avalonia#13795.
grokys added a commit to AvaloniaUI/Avalonia.Controls.TreeDataGrid that referenced this pull request Dec 10, 2023
Port fixes to `RealizedStackElements` from AvaloniaUI/Avalonia#13795.
nil4 pushed a commit to royalapplications/Avalonia.Controls.TreeDataGrid that referenced this pull request Dec 20, 2023
Port fixes to `RealizedStackElements` from AvaloniaUI/Avalonia#13795.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ListBox's selection bug after scrolling (VirtualizingStackPanel)
4 participants