소스 검색

ComPDFKit.Tool(win)- 修复undo栈删除失败问题:导致注释无法删除

liyijie 4 달 전
부모
커밋
bdd760f0ff
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      Demo/Examples/ComPDFKit.Tool/CPDFToolManager.cs

+ 4 - 3
Demo/Examples/ComPDFKit.Tool/CPDFToolManager.cs

@@ -343,9 +343,10 @@ namespace ComPDFKit.Tool
             if (oldToolType == ToolType.ContentEdit)
             {
                 viewerTool.GetCPDFViewer().GetDocument().ReleasePages();
-
-                viewerTool.GetCPDFViewer().UndoManager.RemoveRedoHistoryForType(typeof(PDFEditHistory));
-                viewerTool.GetCPDFViewer().UndoManager.RemoveUndoHistoryForType(typeof(PDFEditHistory));
+                //Undo delete logic
+                viewerTool.GetCPDFViewer().UndoManager.ClearHistory();
+                // viewerTool.GetCPDFViewer().UndoManager.RemoveRedoHistoryForType(typeof(PDFEditHistory));
+                //viewerTool.GetCPDFViewer().UndoManager.RemoveUndoHistoryForType(typeof(PDFEditHistory));
                 viewerTool.GetCPDFViewer().UpdateVirtualNodes();
                 viewerTool.GetCPDFViewer().UpdateRenderFrame();
             }