This commit is contained in:
艾竹
2023-07-09 21:03:35 +08:00
parent 49b95ba881
commit 380c126e33
7 changed files with 47 additions and 23 deletions

View File

@@ -63,10 +63,17 @@ namespace AIStudio.Wpf.DiagramDesigner
}
if (oldnext != null && first == true)
{
System.Windows.Application.Current?.Dispatcher.BeginInvoke(new Action(async () => {
await Task.Delay(10);
GetLast().AddNext(oldnext, false);
}));
//if (this.GetItemHeight() > 0)
//{
// GetLast().AddNext(oldnext, false);
//}
//else
{
System.Windows.Application.Current?.Dispatcher.BeginInvoke(new Action(async () => {
await Task.Delay(10);
GetLast().AddNext(oldnext, false);
}));
}
}
}
@@ -162,10 +169,17 @@ namespace AIStudio.Wpf.DiagramDesigner
child.RemoveFromSelection();
this.GetRootContainItem.AddToSelection(true, true);
System.Windows.Application.Current?.Dispatcher.BeginInvoke(new Action(async () => {
await Task.Delay(10);
AlignNext(this.Next);
}));
//if (this.GetItemHeight() > 0)
//{
// AlignNext(this.Next);
//}
//else
{
System.Windows.Application.Current?.Dispatcher.BeginInvoke(new Action(async () => {
await Task.Delay(10);
AlignNext(this.Next);
}));
}
}
public virtual void RemoveChild(BlockDesignerItemViewModel child, BlockItemsContainerInfo container)
@@ -180,10 +194,17 @@ namespace AIStudio.Wpf.DiagramDesigner
this.RemoveFromSelection();
child.AddToSelection(true, true);
System.Windows.Application.Current?.Dispatcher.BeginInvoke(new Action(async () => {
await Task.Delay(10);
AlignNext(this.Next);
}));
//if (this.GetItemHeight() > 0)
//{
// AlignNext(this.Next);
//}
//else
{
System.Windows.Application.Current?.Dispatcher.BeginInvoke(new Action(async () => {
await Task.Delay(10);
AlignNext(this.Next);
}));
}
}
public string Flag