[codex] Fix label selection across deferred viewports#8242
Draft
yay wants to merge 1 commit into
Draft
Conversation
|
Preview is being built... Preview will be available at https://egui-pr-preview.github.io/pr/8242-codex/fix-deferred-viewport-label-selection View snapshot changes at kitdiff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
ViewportId.selection, while the owning viewport still clears selections whose labels disappear.
Why
Issue #4758 identified that deferred viewports need independent label-selection state. PR #4760
fixed it by keying the temporary state by viewport. The plugin refactor in PR #7385 moved that
state into one context-wide
LabelSelectionState, which accidentally removed the viewportisolation. A pass in another viewport then fails to encounter the selected widgets and clears the
selection.
This restores the behavior of #4760 within the current plugin architecture. Applications do not
need any special handling.
Validation
cargo test -p eguicargo clippy -p egui --all-targets --all-features -- -D warningscargo test -p egui_tests test_atom_selectable_text_can_be_copiedcargo check -p steady --releasecargo test -p steady --release gui::note_window./scripts/check.shpasses formatting, lint, docs, debug/release/WASM clippy, all-target andall-feature tests, and doc tests. It then reaches an unrelated failure already present on
upstream/main:maybe_attach_inspection_pluginis dead code in the no-default-featureegui_demo_appcheck.