From 74cb09d24c15e785327f5fc08fcd767dd93e1ae8 Mon Sep 17 00:00:00 2001 From: glopesdev Date: Wed, 16 Nov 2022 09:35:11 +0000 Subject: [PATCH] Fix upgrade when ungrouping included workflows --- Bonsai.Editor/Bonsai.Editor.csproj | 2 +- Bonsai.Editor/GraphModel/WorkflowEditor.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Bonsai.Editor/Bonsai.Editor.csproj b/Bonsai.Editor/Bonsai.Editor.csproj index af1f17ba9..031451a74 100644 --- a/Bonsai.Editor/Bonsai.Editor.csproj +++ b/Bonsai.Editor/Bonsai.Editor.csproj @@ -7,7 +7,7 @@ true false net472 - 2.7.1 + 2.7.2 diff --git a/Bonsai.Editor/GraphModel/WorkflowEditor.cs b/Bonsai.Editor/GraphModel/WorkflowEditor.cs index ba24995bd..e1a7b2dfc 100644 --- a/Bonsai.Editor/GraphModel/WorkflowEditor.cs +++ b/Bonsai.Editor/GraphModel/WorkflowEditor.cs @@ -1642,8 +1642,8 @@ private void UngroupOrReplaceGraphNode(GraphNode node) var path = includeBuilder.Path; if (workflow != null && !string.IsNullOrEmpty(path)) { - UpgradeHelper.TryUpgradeWorkflow(workflow, path, out workflow); - groupBuilder = new GroupWorkflowBuilder(workflow); + UpgradeHelper.TryUpgradeWorkflow(workflow.FromInspectableGraph(), path, out workflow); + groupBuilder = new GroupWorkflowBuilder(workflow.ToInspectableGraph()); } else groupBuilder = new GroupWorkflowBuilder(); groupBuilder.Name = includeBuilder.Name;