mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-19 16:06:35 +08:00
Mind
This commit is contained in:
@@ -48,7 +48,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
internal List<IGroupable> GetGroupMembers(IGroupable item)
|
||||
internal List<IGroupable> GetGroupMembers(IGroupable item, bool withchildren=true)
|
||||
{
|
||||
IEnumerable<IGroupable> list = DiagramViewModel.Items.OfType<IGroupable>();
|
||||
IGroupable rootItem = GetRoot(list, item);
|
||||
@@ -56,7 +56,18 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
return new List<IGroupable>();
|
||||
}
|
||||
return GetGroupMembers(list, rootItem);
|
||||
|
||||
if (rootItem.IsGroup)//分组状态下,获取全部成员
|
||||
{
|
||||
return GetGroupMembers(list, rootItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (withchildren)
|
||||
return GetGroupMembers(list, item);//普通的Parent关系,获取其Children
|
||||
else
|
||||
return new List<IGroupable>() { item };
|
||||
}
|
||||
}
|
||||
|
||||
internal IGroupable GetGroupRoot(IGroupable item)
|
||||
@@ -98,5 +109,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
return groupMembers;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user