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

Make it possible to change the contents of a view multiple times per frame #8854

Merged
merged 3 commits into from
Jan 30, 2025

Conversation

abey79
Copy link
Member

@abey79 abey79 commented Jan 29, 2025

Related

What

Before, when we would mutate a view entity path filter multiple time in a frame, only the last mutation would be recorded. This could be visible by:

  • multi-selecting several view entities in the blueprint tree (within the same view)
  • right-click -> Remove

==> only one entity would be removed.

This PR makes it possible to mutate a view's content multiple time per frame, solving this bug—and possibly others.

@abey79 abey79 added 🪳 bug Something isn't working ui concerns graphical user interface include in changelog labels Jan 29, 2025
Copy link

github-actions bot commented Jan 29, 2025

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link Manifest
26f63aa https://rerun.io/viewer/pr/8854 +nightly +main

Note: This comment is updated whenever you push a commit.

@emilk emilk self-requested a review January 30, 2025 10:28
Comment on lines +48 to +53
entity_path_filter: ResolvedEntityPathFilter,

/// Update entity path filter.
///
/// Mutations go to this value and should be saved to the blueprint store when they occur.
new_entity_path_filter: Arc<Mutex<ResolvedEntityPathFilter>>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is such a common pattern in imgui. We should at some point think of coming up with a higher-level abstraction for it 🤔 (but not now)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@abey79 abey79 merged commit 0cc13eb into main Jan 30, 2025
31 checks passed
@abey79 abey79 deleted the antoine/fix-view-contents branch January 30, 2025 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working include in changelog ui concerns graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve the entity path filter mutation API
2 participants