diff --git a/Stitch/Graph/Node/Util/NodeDeletedAction.swift b/Stitch/Graph/Node/Util/NodeDeletedAction.swift index 11fc23cf5..870f41180 100644 --- a/Stitch/Graph/Node/Util/NodeDeletedAction.swift +++ b/Stitch/Graph/Node/Util/NodeDeletedAction.swift @@ -95,6 +95,9 @@ extension GraphState { layerNode[keyPath: x.keyPath.layerNodeKeyPath].canvasObserver = nil + // Remove conection + layerNode[keyPath: x.keyPath.layerNodeKeyPath].rowObserver.upstreamOutputCoordinate = nil + case .layerOutput(let x): // Set the canvas-ui-data on the layer node's input = nil guard let layerNode = self.getNodeViewModel(x.node)?.layerNode, diff --git a/Stitch/Graph/PrototypePreview/Layer/View/CommonModifier/PreviewSidebarHighlightModifier.swift b/Stitch/Graph/PrototypePreview/Layer/View/CommonModifier/PreviewSidebarHighlightModifier.swift index e8ef0bf15..9ebc008f2 100644 --- a/Stitch/Graph/PrototypePreview/Layer/View/CommonModifier/PreviewSidebarHighlightModifier.swift +++ b/Stitch/Graph/PrototypePreview/Layer/View/CommonModifier/PreviewSidebarHighlightModifier.swift @@ -32,7 +32,10 @@ struct PreviewSidebarHighlightModifier: ViewModifier { } var isHighlighted: Bool { - highlightedSidebarLayers.contains(nodeId) + // TODO: reads here cause a crash nodes once connected to layer inputs nodes + /// https://github.com/StitchDesign/Stitch/issues/264 +// highlightedSidebarLayers.contains(nodeId) + false } // Subtract out scale, so that line is always same width