[EraseByPoint] 修改添加和移除Stroke的顺序以保证在Stroke复杂时的撤销/重做行为正常
This commit is contained in:
parent
7b4041a216
commit
080b8499f2
@ -3322,13 +3322,6 @@ namespace Ink_Canvas
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item.CurrentStroke != null)
|
||||
{
|
||||
foreach (var currentStroke in item.CurrentStroke)
|
||||
{
|
||||
if (inkCanvas.Strokes.Contains(currentStroke)) inkCanvas.Strokes.Remove(currentStroke);
|
||||
}
|
||||
}
|
||||
if (item.ReplacedStroke != null)
|
||||
{
|
||||
foreach (var replacedStroke in item.ReplacedStroke)
|
||||
@ -3336,6 +3329,13 @@ namespace Ink_Canvas
|
||||
if (!inkCanvas.Strokes.Contains(replacedStroke)) inkCanvas.Strokes.Add(replacedStroke);
|
||||
}
|
||||
}
|
||||
if (item.CurrentStroke != null)
|
||||
{
|
||||
foreach (var currentStroke in item.CurrentStroke)
|
||||
{
|
||||
if (inkCanvas.Strokes.Contains(currentStroke)) inkCanvas.Strokes.Remove(currentStroke);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
IsCommitingByCode = false;
|
||||
@ -3417,13 +3417,6 @@ namespace Ink_Canvas
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item.CurrentStroke != null)
|
||||
{
|
||||
foreach (var currentStroke in item.CurrentStroke)
|
||||
{
|
||||
if (inkCanvas.Strokes.Contains(currentStroke)) inkCanvas.Strokes.Remove(currentStroke);
|
||||
}
|
||||
}
|
||||
if (item.ReplacedStroke != null)
|
||||
{
|
||||
foreach (var replacedStroke in item.ReplacedStroke)
|
||||
@ -3431,6 +3424,13 @@ namespace Ink_Canvas
|
||||
if (!inkCanvas.Strokes.Contains(replacedStroke)) inkCanvas.Strokes.Add(replacedStroke);
|
||||
}
|
||||
}
|
||||
if (item.CurrentStroke != null)
|
||||
{
|
||||
foreach (var currentStroke in item.CurrentStroke)
|
||||
{
|
||||
if (inkCanvas.Strokes.Contains(currentStroke)) inkCanvas.Strokes.Remove(currentStroke);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
IsCommitingByCode = false;
|
||||
|
Loading…
Reference in New Issue
Block a user