Parcourir la source

undo redo -UI部分,不包含模块切换

zhuyi il y a 11 mois
Parent
commit
b992314e10

+ 2 - 0
Demo/Examples/Compdfkit_Tools/Annotation/AnnotationControl/AnnotationControl.xaml.cs

@@ -682,6 +682,7 @@ namespace Compdfkit_Tools.PDFControl
             if (PDFViewControl != null && PDFViewControl.PDFViewTool.GetCPDFViewer() != null)
             {
                 PDFViewControl.PDFViewTool.GetCPDFViewer().UndoManager?.Undo();
+                PDFViewControl.PDFToolManager.ClearSelect();
                 PDFViewControl.PDFViewTool.GetCPDFViewer().UpDateAnnotFrame();
             }
         }
@@ -691,6 +692,7 @@ namespace Compdfkit_Tools.PDFControl
             if (PDFViewControl != null && PDFViewControl.PDFViewTool.GetCPDFViewer() != null)
             {
                 PDFViewControl.PDFViewTool.GetCPDFViewer().UndoManager?.Redo();
+                PDFViewControl.PDFToolManager.ClearSelect();
                 PDFViewControl.PDFViewTool.GetCPDFViewer().UpDateAnnotFrame();
             }
         }

+ 3 - 1
Demo/Examples/Compdfkit_Tools/Form/FormControl/FormControl.xaml.cs

@@ -213,6 +213,7 @@ namespace Compdfkit_Tools.PDFControl
             if (PdfViewControl != null && PdfViewControl.PDFViewTool != null)
             {
                 PdfViewControl.PDFViewTool.GetCPDFViewer().UndoManager?.Undo();
+                PdfViewControl.PDFToolManager.ClearSelect();
                 PdfViewControl.PDFViewTool.GetCPDFViewer().UpDateAnnotFrame();
             }
         }
@@ -222,6 +223,7 @@ namespace Compdfkit_Tools.PDFControl
             if (PdfViewControl != null && PdfViewControl.PDFViewTool != null)
             {
                 PdfViewControl.PDFViewTool.GetCPDFViewer().UndoManager?.Redo();
+                PdfViewControl.PDFToolManager.ClearSelect();
                 PdfViewControl.PDFViewTool.GetCPDFViewer().UpDateAnnotFrame();
             }
         }
@@ -360,7 +362,7 @@ namespace Compdfkit_Tools.PDFControl
                 case C_ANNOTATION_TYPE.C_ANNOTATION_WIDGET:
                     menu.Items.Add(new MenuItem() { Header = "Delete", Command = ApplicationCommands.Delete, CommandTarget = (UIElement)sender });
                     menu.Items.Add(new MenuItem() { Header = "Copy", Command = ApplicationCommands.Copy, CommandTarget = (UIElement)sender });
-                    menu.Items.Add(new MenuItem() { Header = "Cut", Command = ApplicationCommands.Cut, CommandTarget = (UIElement)sender });
+                    //menu.Items.Add(new MenuItem() { Header = "Cut", Command = ApplicationCommands.Cut, CommandTarget = (UIElement)sender });
                     menu.Items.Add(new MenuItem() { Header = "Paste", Command = ApplicationCommands.Paste, CommandTarget = (UIElement)sender });
                     break;
                 default: