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

Ui::scroll_to_me cannot be called for two separate ScrollArea during the same frame #4167

Closed
abey79 opened this issue Mar 13, 2024 · 2 comments
Labels
bug Something is broken egui rerun Desired for Rerun.io

Comments

@abey79
Copy link
Collaborator

abey79 commented Mar 13, 2024

Ui::scroll_to_me appears to use a single, global state to store the scroll target (FrameState::scroll_target). This means that it's not possible to change the scroll position of two separate scroll areas during the same frame. This is a problem e.g. for rerun-io/rerun#5232, where two scroll area should scroll to focused item at the same time.

@emilk
Copy link
Owner

emilk commented Mar 13, 2024

Having two calls to scroll_to_me in two separate ScrollArea:s should already work

@abey79 abey79 closed this as completed Mar 13, 2024
@abey79
Copy link
Collaborator Author

abey79 commented Mar 15, 2024

The situation was way more complicated than that and a couple of bugs were eventually found:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken egui rerun Desired for Rerun.io
Projects
None yet
Development

No branches or pull requests

2 participants