feat: WinRT Ink Analysis 性能优化重构方案
Co-authored-by: traeagent <traeagent@users.noreply.github.com>
This commit is contained in:
@@ -134,23 +134,35 @@ namespace Ink_Canvas
|
|||||||
{
|
{
|
||||||
if (item.StrokeHasBeenCleared)
|
if (item.StrokeHasBeenCleared)
|
||||||
{
|
{
|
||||||
foreach (var strokes in item.CurrentStroke)
|
if (item.CurrentStroke != null)
|
||||||
if (canvas.Strokes.Contains(strokes))
|
{
|
||||||
canvas.Strokes.Remove(strokes);
|
foreach (var strokes in item.CurrentStroke)
|
||||||
|
if (canvas.Strokes.Contains(strokes))
|
||||||
|
canvas.Strokes.Remove(strokes);
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var strokes in item.ReplacedStroke)
|
if (item.ReplacedStroke != null)
|
||||||
if (!canvas.Strokes.Contains(strokes))
|
{
|
||||||
canvas.Strokes.Add(strokes);
|
foreach (var strokes in item.ReplacedStroke)
|
||||||
|
if (!canvas.Strokes.Contains(strokes))
|
||||||
|
canvas.Strokes.Add(strokes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
foreach (var strokes in item.CurrentStroke)
|
if (item.CurrentStroke != null)
|
||||||
if (!canvas.Strokes.Contains(strokes))
|
{
|
||||||
canvas.Strokes.Add(strokes);
|
foreach (var strokes in item.CurrentStroke)
|
||||||
|
if (!canvas.Strokes.Contains(strokes))
|
||||||
|
canvas.Strokes.Add(strokes);
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var strokes in item.ReplacedStroke)
|
if (item.ReplacedStroke != null)
|
||||||
if (canvas.Strokes.Contains(strokes))
|
{
|
||||||
canvas.Strokes.Remove(strokes);
|
foreach (var strokes in item.ReplacedStroke)
|
||||||
|
if (canvas.Strokes.Contains(strokes))
|
||||||
|
canvas.Strokes.Remove(strokes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (item.CommitType == TimeMachineHistoryType.Manipulation)
|
else if (item.CommitType == TimeMachineHistoryType.Manipulation)
|
||||||
|
|||||||
Reference in New Issue
Block a user