[fix] 修复自定义板擦导致的TimeMachine无法提交墨迹被擦除事件的Bug

This commit is contained in:
Dubi906w 2024-08-03 21:48:10 +08:00
parent d83a81074a
commit 3a33f26356
2 changed files with 8 additions and 5 deletions

View File

@ -94,6 +94,14 @@ namespace Ink_Canvas {
// end hittest
hitTester.EndHitTesting();
// commit stroke erased history
// 我有受虐倾向被这个bug硬控10秒钟请大家嘲笑我
if (ReplacedStroke != null || AddedStroke != null) {
timeMachine.CommitStrokeEraseHistory(ReplacedStroke, AddedStroke);
AddedStroke = null;
ReplacedStroke = null;
}
}
private void EraserGeometry_StrokeHit(object sender,

View File

@ -1558,11 +1558,6 @@ namespace Ink_Canvas {
}
isMouseDown = false;
if (ReplacedStroke != null || AddedStroke != null) {
timeMachine.CommitStrokeEraseHistory(ReplacedStroke, AddedStroke);
AddedStroke = null;
ReplacedStroke = null;
}
if (_currentCommitType == CommitReason.ShapeDrawing && drawingShapeMode != 9) {
_currentCommitType = CommitReason.UserInput;