-
Notifications
You must be signed in to change notification settings - Fork 326
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
Fix: when default visualization is displayed, its entry is not present in the chooser list. #6209
Conversation
app/gui/view/graph-editor/src/component/visualization/container.rs
Outdated
Show resolved
Hide resolved
…r.rs Co-authored-by: Ilya Bogdanov <[email protected]>
@vitvakatu @MichaelMauderer can one of you QA this? |
I will check it |
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.
QA: passed. Also, I wasn't able to reproduce #5991 on this branch, but it needs to be checked separately. cc @MichaelMauderer
selected_definition <- action_bar.visualisation_selection.map(f!([registry](path) | ||
path.as_ref().and_then(|path| registry.definition_from_path(path)) | ||
)); | ||
on_selected <- selected_definition.map(|d|d.as_ref().map(|_|())).unwrap(); |
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.
.map(|_| ())
-> .constant(())
path.as_ref().and_then(|path| registry.definition_from_path(path)) | ||
)); | ||
on_selected <- selected_definition.map(|d|d.as_ref().map(|_|())).unwrap(); | ||
eval_ on_selected ( action_bar.hide_icons.emit(()) ); |
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.
action_bar.hide_icons <+ on_selected
// === Visualisation Chooser Bindings === | ||
|
||
frp::extend! { network | ||
selected_definition <- action_bar.visualisation_selection.map(f!([registry](path) |
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.
double space
@@ -538,7 +552,7 @@ impl Container { | |||
// === Switching Visualizations === | |||
|
|||
frp::extend! { network | |||
new_vis_definition <- any(frp.set_visualization,vis_after_cycling,default_visualisation); | |||
new_vis_definition <- any(frp.set_visualization, selected_definition, vis_after_cycling, default_visualisation).on_change(); |
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.
100 chars
Pull Request Description
The visualization was blank because we set a new visualization instance with same data for attaching, so
VisualizationManager
skipped attaching (and thus the data for previous instance were not shared with the new one).And the entry was visible, because we informed chooser about selected vis before the visualization list arrived.
Fixes #5992 may also fix some other issues with blank visualizations.
Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.