mirror of
https://github.com/enso-org/enso.git
synced 2024-11-22 22:10:15 +03:00
Do not attach visualization on startup. (#5841)
@hubertp has reported in #5620 that sometimes enabling visualization does not send "attachVisualization" message to the engine. The actual cause was simply because it was already attached. Updating the default visualizations (when receiving information about type) updated the preprocessors, what caused in turn attaching visualization. That was a bug, of course. This PR fixes it: now we don't update any visualization if it's hidden.
This commit is contained in:
parent
ad03f98c5d
commit
d3b247a2bc
@ -128,6 +128,7 @@ syn = { version = "1.0", features = [
|
||||
"extra-traits",
|
||||
"printing",
|
||||
"parsing",
|
||||
"visit",
|
||||
"visit-mut",
|
||||
] }
|
||||
quote = { version = "1.0.23" }
|
||||
|
@ -1619,12 +1619,16 @@ impl GraphEditorModelWithNetwork {
|
||||
|
||||
selected <- vis_is_selected.on_true();
|
||||
deselected <- vis_is_selected.on_false();
|
||||
output.visualization_preprocessor_changed <+
|
||||
node_model.visualization.frp.preprocessor.map(move |preprocessor|
|
||||
(node_id,preprocessor.clone()));
|
||||
output.on_visualization_select <+ selected.constant(Switch::On(node_id));
|
||||
output.on_visualization_select <+ deselected.constant(Switch::Off(node_id));
|
||||
|
||||
preprocessor_changed <-
|
||||
node_model.visualization.frp.preprocessor.map(move |preprocessor| {
|
||||
(node_id,preprocessor.clone())
|
||||
});
|
||||
output.visualization_preprocessor_changed <+ preprocessor_changed.gate(&node.visualization_visible);
|
||||
|
||||
|
||||
metadata <- any(...);
|
||||
metadata <+ node_model.visualization.frp.preprocessor.map(visualization::Metadata::new);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user