From 00c0a4d387e4380a9116119c79aec061b43bf83d Mon Sep 17 00:00:00 2001 From: fengjiayi <12821976+ning_xi@user.noreply.gitee.com> Date: Fri, 30 May 2025 12:06:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A4=E5=B7=A5=E4=BD=9C=E5=8F=B0=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E6=97=B6=E5=88=87=E6=8D=A2=E7=94=BB=E5=B8=83=EF=BC=8C?= =?UTF-8?q?=E5=B0=BD=E5=8F=AF=E8=83=BD=E8=A7=A6=E5=8F=91UI=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E8=8E=B7=E5=8F=96=E9=80=82=E9=85=8D=E5=99=A8=E3=80=81?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E8=8A=82=E7=82=B9=E4=B9=8B=E9=97=B4=E7=9A=84?= =?UTF-8?q?=E8=BF=9E=E7=BA=BF=E6=98=BE=E7=A4=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Workbench/Services/WorkbenchEventService.cs | 14 ++++++++++++++ Workbench/ViewModels/FlowEditViewModel.cs | 8 ++++++++ 2 files changed, 22 insertions(+) diff --git a/Workbench/Services/WorkbenchEventService.cs b/Workbench/Services/WorkbenchEventService.cs index 33bbd94..0e25087 100644 --- a/Workbench/Services/WorkbenchEventService.cs +++ b/Workbench/Services/WorkbenchEventService.cs @@ -3,6 +3,7 @@ using Newtonsoft.Json.Linq; using Serein.Library; using Serein.Library.Api; using Serein.Workbench.Api; +using Serein.Workbench.ViewModels; using System; using System.Collections.Generic; using System.IO; @@ -89,7 +90,20 @@ namespace Serein.Workbench.Services private void FlowEEForwardingService_OnProjectLoaded(ProjectLoadedEventArgs eventArgs) { + var edit = App.GetService().FlowEditViewModel; + App.UIContextOperation.Invoke(async () => { + + foreach (var item in flowNodeService.FlowCanvass) + { + await Task.Delay(50); + flowNodeService.CurrentSelectCanvas = item; + var tab = edit.CanvasTabs.First(tab => tab.Content == item); + edit.SelectedTab = tab; + } + }); + + } private void KeyEventService_OnKeyDown(System.Windows.Input.Key key) diff --git a/Workbench/ViewModels/FlowEditViewModel.cs b/Workbench/ViewModels/FlowEditViewModel.cs index ef37377..4fc1ad9 100644 --- a/Workbench/ViewModels/FlowEditViewModel.cs +++ b/Workbench/ViewModels/FlowEditViewModel.cs @@ -50,6 +50,14 @@ namespace Serein.Workbench.ViewModels partial void OnSelectedTabChanged(FlowEditorTabModel value) { flowNodeService.CurrentSelectCanvas = value?.Content; + if(value is not null) + { + App.UIContextOperation.Invoke(() => { + + value.Content.RefreshAllLine(); + }); + } + }