Browse Source

ComPDFKit.Tool(pdftech) - 分组Undo Redo 对象Check函数更改

liyuxuan 8 months ago
parent
commit
f59c50c7a5

+ 2 - 1
Demo/Examples/ComPDFKit.Tool/UndoManger/AnnotHistory.cs

@@ -99,8 +99,9 @@ namespace ComPDFKit.Tool.UndoManger
             if (checkItem is GroupHistory)
             {
                 GroupHistory groupHistory = (GroupHistory)checkItem;
-                foreach (AnnotHistory checkAnnot in groupHistory.Histories)
+                foreach (IHistory checkHistory in groupHistory.Histories)
                 {
+                    AnnotHistory checkAnnot = checkHistory as AnnotHistory;
                     if (checkAnnot == null || checkAnnotList.Contains(checkAnnot))
                     {
                         continue;

+ 2 - 1
Demo/Examples/ComPDFKit.Tool/UndoManger/GroupHistory.cs

@@ -131,8 +131,9 @@ namespace ComPDFKit.Tool.UndoManger
             if (checkItem is GroupHistory)
             {
                 GroupHistory groupHistory = (GroupHistory)checkItem;
-                foreach (AnnotHistory checkAnnot in groupHistory.Histories)
+                foreach (IHistory checkHistory in groupHistory.Histories)
                 {
+                    AnnotHistory checkAnnot = checkHistory as AnnotHistory;
                     if (checkAnnot == null || checkAnnotList.Contains(checkAnnot))
                     {
                         continue;

+ 2 - 1
Demo/Examples/ComPDFKit.Tool/UndoManger/MultiAnnotHistory.cs

@@ -54,8 +54,9 @@ namespace ComPDFKit.Tool.UndoManger
             if (checkItem is GroupHistory)
             {
                 GroupHistory groupHistory = (GroupHistory)checkItem;
-                foreach (AnnotHistory checkAnnot in groupHistory.Histories)
+                foreach (IHistory checkHistory in groupHistory.Histories)
                 {
+                    AnnotHistory checkAnnot = checkHistory as AnnotHistory;
                     if (checkAnnot == null || checkAnnotList.Contains(checkAnnot))
                     {
                         continue;