/// <summary> /// 删除直线 /// </summary> /// <param name="line"></param> public void DeleteLine(DeleteLineCommand command) { if (!command.IsRedo)///是第一次插入直线,而非重做撤销的插入直线命令 { command.IsRedo = true; } for (int i = 0; i < command.RemovedRects.Count; i++) { command.AddedRects[i].MergeTwoRect(command.RemovedRects[i]); } }