From c3eecdbd55181f5bde45b6dcca7f759069509ee3 Mon Sep 17 00:00:00 2001 From: Adam Obuchowicz Date: Wed, 7 Apr 2021 15:49:53 +0200 Subject: [PATCH] Fix visualization displayed with error on preview (https://github.com/enso-org/ide/pull/1442) Original commit: https://github.com/enso-org/ide/commit/58a7ef1982770cd3ec35c43583acd7853923b85a --- .../rust/ide/view/graph-editor/src/component/node.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gui/src/rust/ide/view/graph-editor/src/component/node.rs b/gui/src/rust/ide/view/graph-editor/src/component/node.rs index 9b95edcde8..c131cd230e 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/node.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/node.rs @@ -506,11 +506,7 @@ impl NodeModel { if let Some(error_data) = error.visualization_data() { self.error_visualization.set_data(&error_data); } - if !*error.propagated { - self.display_object.add_child(&self.error_visualization); - } else { - self.error_visualization.unset_parent(); - } + self.display_object.add_child(&self.error_visualization); } else { self.error_visualization.unset_parent(); } @@ -640,8 +636,8 @@ impl Node { preview_visible <- preview_visible && has_expression; preview_visible <- preview_visible.on_change(); - visualization_visible <- visualization_enabled && no_error_set; - visualization_visible <- visualization_visible || preview_visible; + visualization_visible <- visualization_enabled || preview_visible; + visualization_visible <- visualization_visible && no_error_set; visualization_visible <- visualization_visible.on_change(); frp.source.visualization_enabled <+ visualization_enabled || preview_visible; eval visualization_visible ((is_visible) @@ -657,7 +653,7 @@ impl Node { eval layer ((l) model.error_visualization.frp.set_layer.emit(l)); - update_error <- all(frp.set_error,visualization_visible); + update_error <- all(frp.set_error,preview_visible); eval update_error([model]((error,visible)){ if *visible { model.set_error(error.as_ref());