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 id clash in Ui::response #5192

Merged
merged 1 commit into from
Sep 30, 2024
Merged

Fix id clash in Ui::response #5192

merged 1 commit into from
Sep 30, 2024

Conversation

emilk
Copy link
Owner

@emilk emilk commented Sep 30, 2024

This adds a new Ui::unique_id used in Ui::response.

I'll make a follow-up PR where the old id is renamed stable_id, and deprecate fn id to force users to think through which id they want.

@emilk emilk added bug Something is broken egui labels Sep 30, 2024
@emilk emilk added this to the Next Patch Release milestone Sep 30, 2024
Copy link

Preview available at https://egui-pr-preview.github.io/pr/5192-emilk/use-unique-ui-id
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

@emilk emilk changed the title Fix bug in Ui::response Fix id clash in Ui::response Sep 30, 2024
@emilk emilk merged commit 448e12d into master Sep 30, 2024
44 checks passed
@emilk emilk deleted the emilk/use-unique-ui-id branch September 30, 2024 11:20
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
This adds a new `Ui::unique_id` used in `Ui::response`.

I'll make a follow-up PR where the old `id` is renamed `stable_id`, and
deprecate `fn id` to force users to think through which `id` they want.

* Closes emilk#5190
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken egui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ui::response only works if UiBuilder::id_salt is uniquely set
1 participant