Преглед изворни кода

bug - 解决图章多次添加问题

sunhaonan пре 1 година
родитељ
комит
848b4381cc

+ 7 - 1
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationControl/CPDFAnnotationControl.xaml.cs

@@ -91,6 +91,12 @@ namespace Compdfkit_Tools.PDFControl
             if (e.IsCreate)
             {
                 pdfViewerControl.UpdateAnnotFrame();
+
+            }
+            if (currentAnnotationType == CPDFAnnotationType.Image || currentAnnotationType == CPDFAnnotationType.Stamp || currentAnnotationType == CPDFAnnotationType.Signature)
+            {
+                pdfViewerControl.SetToolType(ToolType.Pan);
+                pdfViewerControl.SetIsVisibleCustomMouse(false);
                 pdfViewerControl.SetIsShowStampMouse(false);
             }
         }
@@ -764,7 +770,7 @@ namespace Compdfkit_Tools.PDFControl
         {
             this.pdfViewerControl.SetToolType(ToolType.Pan);
             pdfViewerControl.SetIsShowStampMouse(false);
-            //ClearPanel();
+            ClearPanel();
         }
 
         private void CPDFAnnotationControl_PropertyChanged(object sender, CPDFAnnotationData e)

+ 4 - 0
Demo/Examples/Compdfkit_Tools/Common/BarControl/CPDFAnnotationBarControl.xaml.cs

@@ -330,6 +330,10 @@ namespace Compdfkit_Tools.PDFControl
             {
                 AnnotationPropertyChanged?.Invoke(sender, CPDFAnnotationDictionary.GetAnnotationFromTag[(sender as ToggleButton).Tag.ToString()]);
                 CurrentMode = (sender as ToggleButton).Tag.ToString();
+                if(CurrentMode == "Image")
+                {
+                    (sender as ToggleButton).IsChecked = false;
+                }
             }
             else
             {