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

Context menu 4: add "Clone space view" action #5265

Merged
merged 8 commits into from
Feb 26, 2024

Conversation

abey79
Copy link
Member

@abey79 abey79 commented Feb 23, 2024

What

This PR adds "Clone Space View" to the context menu (when clicking a single space view). Also, now the the cloned space view appears just after the original space view, in the same container (previously it would typically appear at the end of the root container regardless of the position of the original space view).

image

This PR also unearthed a bug that I'm surprised didn't surface earlier. The effect of mark_user_interaction wasn't visible until the next frame, as the value was only saved to blueprint, and not cached in the ViewportBlurprint. This could lead to an issue when TreeAction are processed end-of-frame and exposed to the "old" mark_user_interaction flag values (namely: unwanted reset of the tree). Those flags are now Mutexes (to gain interior mutability) AtomicBools and updated in place (in addition to being saved to blueprint like before). cc @jleibs

part of:

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

@abey79 abey79 added ui concerns graphical user interface include in changelog labels Feb 23, 2024
@abey79
Copy link
Member Author

abey79 commented Feb 23, 2024

Mmm I get some weird behaviour with opf (after bp reset): the cloned space view ends up in a newly created grid container 🤔

Edit: ✅

@abey79 abey79 marked this pull request as draft February 26, 2024 09:04
@abey79 abey79 marked this pull request as ready for review February 26, 2024 09:54
@Wumpf Wumpf self-requested a review February 26, 2024 10:50
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

The mutex handling indeed doesn't make sense to me. Everything else checks out (:

crates/re_viewport/src/viewport_blueprint.rs Outdated Show resolved Hide resolved
crates/re_viewport/src/viewport_blueprint.rs Outdated Show resolved Hide resolved
crates/re_viewport/src/viewport_blueprint.rs Outdated Show resolved Hide resolved
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

much better :)

@abey79 abey79 merged commit 129a450 into main Feb 26, 2024
40 checks passed
@abey79 abey79 deleted the antoine/cm4-clone-space-view branch February 26, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog ui concerns graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants