mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-05-02 13:21:28 +08:00
令工作台启动时切换画布,尽可能触发UI节点获取适配器、刷新节点之间的连线显示。
This commit is contained in:
@@ -3,6 +3,7 @@ using Newtonsoft.Json.Linq;
|
|||||||
using Serein.Library;
|
using Serein.Library;
|
||||||
using Serein.Library.Api;
|
using Serein.Library.Api;
|
||||||
using Serein.Workbench.Api;
|
using Serein.Workbench.Api;
|
||||||
|
using Serein.Workbench.ViewModels;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
@@ -89,6 +90,19 @@ namespace Serein.Workbench.Services
|
|||||||
|
|
||||||
private void FlowEEForwardingService_OnProjectLoaded(ProjectLoadedEventArgs eventArgs)
|
private void FlowEEForwardingService_OnProjectLoaded(ProjectLoadedEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
|
var edit = App.GetService<Locator>().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;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,14 @@ namespace Serein.Workbench.ViewModels
|
|||||||
partial void OnSelectedTabChanged(FlowEditorTabModel value)
|
partial void OnSelectedTabChanged(FlowEditorTabModel value)
|
||||||
{
|
{
|
||||||
flowNodeService.CurrentSelectCanvas = value?.Content;
|
flowNodeService.CurrentSelectCanvas = value?.Content;
|
||||||
|
if(value is not null)
|
||||||
|
{
|
||||||
|
App.UIContextOperation.Invoke(() => {
|
||||||
|
|
||||||
|
value.Content.RefreshAllLine();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user