mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
xx
This commit is contained in:
@@ -124,7 +124,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
public virtual void AddChild(BlockDesignerItemViewModel child)
|
||||
{
|
||||
child.RemoveFromSelection();
|
||||
this.AddToSelection(true, false);
|
||||
this.GetRootParent.AddToSelection(true, true);
|
||||
|
||||
System.Windows.Application.Current?.Dispatcher.BeginInvoke(new Action(async () => {
|
||||
await Task.Delay(10);
|
||||
@@ -136,7 +136,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
public virtual void RemoveChild(BlockDesignerItemViewModel child)
|
||||
{
|
||||
this.RemoveFromSelection();
|
||||
child.AddToSelection(true, false);
|
||||
|
||||
child.AddToSelection(true, true);
|
||||
|
||||
System.Windows.Application.Current?.Dispatcher.BeginInvoke(new Action(async () => {
|
||||
await Task.Delay(10);
|
||||
@@ -155,6 +156,26 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
return Contains?.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
|
||||
public List<ItemsContainerInfo> GetAllContain()
|
||||
{
|
||||
return Contains.SelectMany(p => p.GetAllContain(p.Children, true)).ToList();
|
||||
}
|
||||
|
||||
public BlockDesignerItemViewModel GetRootParent
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ParentContain == null)
|
||||
{
|
||||
return this;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ParentContain.DataItem.GetRootParent;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user