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

Handle Move in TreeSelectionMode. #317

Merged
merged 8 commits into from
Nov 26, 2024
Merged

Conversation

grokys
Copy link
Member

@grokys grokys commented Nov 25, 2024

Previously, a NotifyCollectionChangedAction.Move would cause TreeSelectionNode to throw a NotSupportedException. This PR allows TreeSelectionNode to handle moves.

Note that if the moved item is currently selected, it will be unselected: it does not try to preserve a moved selection as that will require an API change in TreeSelectionModelIndexesChangedEventArgs to notify of multiple index ranges being changed.

Seems to be a left-over from development. Clear the anchor index if it's invalid to make the test pass.
Copy link

@giard-alexandre giard-alexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Small comment on what seems like an unused import

@grokys grokys marked this pull request as ready for review November 26, 2024 10:08
@grokys
Copy link
Member Author

grokys commented Nov 26, 2024

Customer has tested and fixes their issue 🎈

@grokys grokys enabled auto-merge November 26, 2024 10:09
@grokys grokys merged commit ca2f993 into master Nov 26, 2024
2 of 3 checks passed
@grokys grokys deleted the fixes/selection-collectionchanged branch November 26, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants