Skip to content

Fix id clash in Ui::response - #5192

Merged
emilk merged 1 commit into
masterfrom
emilk/use-unique-ui-id
Sep 30, 2024
Merged

emilk merged 1 commit into
masterfrom
emilk/use-unique-ui-id

Conversation

@emilk

@emilk emilk commented Sep 30, 2024

Copy link
Copy Markdown
Owner

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
@github-actions

Copy link
Copy Markdown

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
@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