Merge pull request #456 from InkCanvasForClass/trae/solo-agent-hICuRf
Fix: 增强时光机功能处理笔划更改时的稳定性
This commit is contained in:
@@ -134,23 +134,35 @@ namespace Ink_Canvas
|
||||
{
|
||||
if (item.StrokeHasBeenCleared)
|
||||
{
|
||||
foreach (var strokes in item.CurrentStroke)
|
||||
if (canvas.Strokes.Contains(strokes))
|
||||
canvas.Strokes.Remove(strokes);
|
||||
if (item.CurrentStroke != null)
|
||||
{
|
||||
foreach (var strokes in item.CurrentStroke)
|
||||
if (canvas.Strokes.Contains(strokes))
|
||||
canvas.Strokes.Remove(strokes);
|
||||
}
|
||||
|
||||
foreach (var strokes in item.ReplacedStroke)
|
||||
if (!canvas.Strokes.Contains(strokes))
|
||||
canvas.Strokes.Add(strokes);
|
||||
if (item.ReplacedStroke != null)
|
||||
{
|
||||
foreach (var strokes in item.ReplacedStroke)
|
||||
if (!canvas.Strokes.Contains(strokes))
|
||||
canvas.Strokes.Add(strokes);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var strokes in item.CurrentStroke)
|
||||
if (!canvas.Strokes.Contains(strokes))
|
||||
canvas.Strokes.Add(strokes);
|
||||
if (item.CurrentStroke != null)
|
||||
{
|
||||
foreach (var strokes in item.CurrentStroke)
|
||||
if (!canvas.Strokes.Contains(strokes))
|
||||
canvas.Strokes.Add(strokes);
|
||||
}
|
||||
|
||||
foreach (var strokes in item.ReplacedStroke)
|
||||
if (canvas.Strokes.Contains(strokes))
|
||||
canvas.Strokes.Remove(strokes);
|
||||
if (item.ReplacedStroke != null)
|
||||
{
|
||||
foreach (var strokes in item.ReplacedStroke)
|
||||
if (canvas.Strokes.Contains(strokes))
|
||||
canvas.Strokes.Remove(strokes);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (item.CommitType == TimeMachineHistoryType.Manipulation)
|
||||
|
||||
Reference in New Issue
Block a user