[BugFix] 修复部分情况下无法保存笔画历史记录的bug

This commit is contained in:
Raspberry-Monster 2023-05-14 22:26:20 +08:00
parent 0a81c09dc0
commit f89971e596
No known key found for this signature in database
GPG Key ID: 9A0D725BB122D507

View File

@ -5322,7 +5322,16 @@ namespace Ink_Canvas
if (_currentCommitType == CommitReason.ShapeDrawing && drawingShapeMode != 9)
{
_currentCommitType = CommitReason.UserInput;
timeMachine.CommitStrokeUserInputHistory(lastTempStrokeCollection);
StrokeCollection collection;
if (lastTempStrokeCollection != null && lastTempStrokeCollection.Count > 0)
{
collection = lastTempStrokeCollection;
}
else
{
collection = new StrokeCollection () { lastTempStroke };
}
timeMachine.CommitStrokeUserInputHistory(collection);
}
lastTempStroke = null;
lastTempStrokeCollection = null;