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 selection bug in SpFilteringSelectableListPresenter #1535

Merged
merged 2 commits into from Apr 9, 2024

Conversation

jecisc
Copy link
Member

@jecisc jecisc commented Apr 9, 2024

SpFilteringSelectableListPresenter has items and a list of the selected items. But if we change the items while a selection exists, we end up with selected elements that are not in the list.

I propose to filter out those selected elements when we update the items. This fixes a bug in the SpChooserPresenter when we could have duplicated elements in the target list if we clicked multiple times on the "move elements" button.

SpFilteringSelectableListPresenter has items and a list of the selected items. But if we change the items while a selection exists, we end up with selected elements that are not in the list. 

I propose to filter out those selected elements when we update the items. This fixes a bug in the ChooserPresenter when we could have duplicated elements in the target list if we clicked multiple times on the "move elements" button.
@jecisc
Copy link
Member Author

jecisc commented Apr 9, 2024

Failing tests are not related

@jecisc jecisc merged commit 57359c2 into Pharo12 Apr 9, 2024
1 of 2 checks passed
@jecisc jecisc deleted the fix-chooser-presenter branch April 9, 2024 13:42
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.

None yet

2 participants