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

Warn about Id clashes for Grid, Plot, ScrollArea, Table #1452

Merged
merged 1 commit into from
Apr 4, 2022

Conversation

emilk
Copy link
Owner

@emilk emilk commented Apr 4, 2022

Id clashes can cause subtle bugs.

egui already warns when the same Id is used to interact with different parts of the screen.

This adds warnings about id clashes for some widgets that store state: Grid, Plot, ScrollArea, egui_extras::Table.

The PR also adds Context::check_for_id_clash so users who create their own widgets can add the same type of check.

Id clashes can cause subtle bugs.

egui already warns when the same Id is used to interact with different
parts of the screen.

This adds warnings about id clashes for some widgets that store state:
Grid, Plot, ScrollArea, Table.

The PR also adds `Context::check_for_id_clash` so users who create
their own widgets can add the same type of check.
@emilk emilk force-pushed the warn-about-more-id-clashes branch from b7ab4ca to d4b2e34 Compare April 4, 2022 10:18
@emilk emilk merged commit c3b6d1b into master Apr 4, 2022
@emilk emilk deleted the warn-about-more-id-clashes branch April 4, 2022 11:13
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.

1 participant