-
Notifications
You must be signed in to change notification settings - Fork 373
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
Add support for editing a space view's space origin #4848
Conversation
I'm noticing a problematic interaction with heuristics we probably need to figure out. In the SFM example, if I click the original space-view |
We probably shouldn't be adding new views once the user has modified the blueprint. Once they have, we could consider highlighting the plus button and suggesting the top three views that would be added if we were to reset the blueprint |
Is that blocking for this PR? |
# Conflicts: # crates/re_viewer/src/ui/selection_panel.rs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the ui feels pretty nice, well done!
I left comments asking for major changes, but putting approve
anyways since I'd be happy to move forward as is and taking those later
if entered_editing { | ||
output.response.request_focus(); | ||
let min = egui::text::CCursor::new(0); | ||
let max = egui::text::CCursor::new(space_origin_string.len()); | ||
let new_range = egui::text::CCursorRange::two(min, max); | ||
output.state.cursor.set_char_range(Some(new_range)); | ||
output.state.store(ui.ctx(), output.response.id); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@emilk I have an problem with this code. It should select all the text, but if the click happens on the text, then it selects only all the way to where the mouse cursor is. I can't make sense of that behaviour. Any idea what's going on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird - no I don't know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue with repro here: emilk/egui#3883
What
This PR adds the possibility to edit a space view's space origin.
Note:This PR is affected by the following issue:
TextCursorState.set_char_range()
interacts wrongly with user click emilk/egui#3883TODO:
space_origin_edit.mp4
Follow-up issues:
Checklist
main
build: app.rerun.ionightly
build: app.rerun.io