mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-29 12:43:24 +08:00
mind不可删除修复
This commit is contained in:
@@ -785,7 +785,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
|||||||
items.Select(p => p.RootNode).Distinct().ToList().ForEach(p => p.UpdatedLayout());
|
items.Select(p => p.RootNode).Distinct().ToList().ForEach(p => p.UpdatedLayout());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<SelectableDesignerItemViewModelBase> Delete(object parameter, bool delete = true, bool direct = true)
|
protected override void ExecuteDeleteCommand(object parameter)
|
||||||
{
|
{
|
||||||
List<MindNode> items = new List<MindNode>();
|
List<MindNode> items = new List<MindNode>();
|
||||||
List<SelectableDesignerItemViewModelBase> others = new List<SelectableDesignerItemViewModelBase>();
|
List<SelectableDesignerItemViewModelBase> others = new List<SelectableDesignerItemViewModelBase>();
|
||||||
@@ -815,8 +815,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
|||||||
//去重
|
//去重
|
||||||
items = items.Distinct().ToList();
|
items = items.Distinct().ToList();
|
||||||
|
|
||||||
if (delete)
|
|
||||||
{
|
|
||||||
Dictionary<MindNode, Tuple<int, MindNode>> indexs = items.ToDictionary(p => p, p => new Tuple<int, MindNode>(p.ParentNode != null ? p.ParentNode.Children.IndexOf(p) : 0, p.ParentNode));
|
Dictionary<MindNode, Tuple<int, MindNode>> indexs = items.ToDictionary(p => p, p => new Tuple<int, MindNode>(p.ParentNode != null ? p.ParentNode.Children.IndexOf(p) : 0, p.ParentNode));
|
||||||
DoCommandManager.DoNewCommand(this.ToString(),
|
DoCommandManager.DoNewCommand(this.ToString(),
|
||||||
() => {
|
() => {
|
||||||
@@ -851,11 +850,8 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
|||||||
items.Select(p => p.RootNode).Distinct().ToList().ForEach(p => p.UpdatedLayout());
|
items.Select(p => p.RootNode).Distinct().ToList().ForEach(p => p.UpdatedLayout());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return items.OfType<SelectableDesignerItemViewModelBase>().ToList();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 复制,粘贴
|
#region 复制,粘贴
|
||||||
|
|||||||
Reference in New Issue
Block a user