mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-18 23:46:37 +08:00
整理Redo和Undo命令
This commit is contained in:
@@ -774,7 +774,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
items.Select(p => p.RootNode).Distinct().ToList().ForEach(p => p.UpdatedLayout());
|
||||
}
|
||||
|
||||
protected override bool Delete(object parameter)
|
||||
protected override List<SelectableDesignerItemViewModelBase> Delete(object parameter, bool delete = true)
|
||||
{
|
||||
List<MindNode> items = new List<MindNode>();
|
||||
List<SelectableDesignerItemViewModelBase> others = new List<SelectableDesignerItemViewModelBase>();
|
||||
@@ -793,11 +793,6 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
others = SelectedItems.Where(p => !(p is MindNode)).ToList();
|
||||
}
|
||||
|
||||
if (items.FirstOrDefault()?.IsEditing != false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (items.Any())
|
||||
{
|
||||
//把子节点都加上
|
||||
@@ -842,10 +837,10 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
|
||||
items.Select(p => p.RootNode).Distinct().ToList().ForEach(p => p.UpdatedLayout());
|
||||
});
|
||||
return true;
|
||||
return items.OfType<SelectableDesignerItemViewModelBase>().ToList();
|
||||
}
|
||||
else
|
||||
return false;
|
||||
return null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user