diff --git a/CHANGELOG.md b/CHANGELOG.md index 77e9d9a10bab..00213144f1a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -103,6 +103,7 @@ - [The component browser suggestions take into account entry aliases][5678]. The searcher input is now matched to entry aliases too. The alias match is used to filter and sort component browser entries. +- [Fixed missing result preview when editing nodes.][5757] #### EnsoGL (rendering engine) @@ -500,6 +501,7 @@ [5699]: https://github.com/enso-org/enso/pull/5699 [5719]: https://github.com/enso-org/enso/pull/5719 [5721]: https://github.com/enso-org/enso/pull/5721 +[5757]: https://github.com/enso-org/enso/pull/5757 #### Enso Compiler diff --git a/app/gui/view/graph-editor/src/component/visualization/container.rs b/app/gui/view/graph-editor/src/component/visualization/container.rs index 34716ada84a2..04d8d617515d 100644 --- a/app/gui/view/graph-editor/src/component/visualization/container.rs +++ b/app/gui/view/graph-editor/src/component/visualization/container.rs @@ -501,10 +501,14 @@ impl Container { eval_ frp.toggle_visibility (model.toggle_visibility()); visualisation_uninitialised <- frp.set_visualization.map(|t| t.is_none()); - set_default_visualisation <- frp.set_vis_input_type.gate(&visualisation_uninitialised).unwrap(); - default_visualisation <- set_default_visualisation.map(f!((tp) { + default_visualisation <- visualisation_uninitialised.on_true().map(|_| { + Some(visualization::Registry::default_visualisation()) + }); + vis_input_type <- frp.set_vis_input_type.gate(&visualisation_uninitialised).unwrap(); + default_visualisation_for_type <- vis_input_type.map(f!((tp) { registry.default_visualization_for_type(tp) })); + default_visualisation <- any(&default_visualisation, &default_visualisation_for_type); eval frp.set_data ((t) model.set_visualization_data(t)); frp.source.size <+ frp.set_size;