Procházet zdrojové kódy

ComPDFKit.Tool(win) - 修复Viewer模式下可以选中多边形注释的问题

TangJinZhou před 2 týdny
rodič
revize
f0cc08218f
1 změnil soubory, kde provedl 12 přidání a 9 odebrání
  1. 12 9
      Demo/Examples/ComPDFKit.Tool/CPDFToolManager.cs

+ 12 - 9
Demo/Examples/ComPDFKit.Tool/CPDFToolManager.cs

@@ -876,11 +876,11 @@ namespace ComPDFKit.Tool
             if (e.hitTestType == MouseHitTestType.SelectRect)
             {
                 List<C_ANNOTATION_TYPE> list = new List<C_ANNOTATION_TYPE>()
-                        {
-                            C_ANNOTATION_TYPE.C_ANNOTATION_LINE,
-                            C_ANNOTATION_TYPE.C_ANNOTATION_POLYLINE,
-                            C_ANNOTATION_TYPE.C_ANNOTATION_POLYGON,
-                        };
+                {
+                    C_ANNOTATION_TYPE.C_ANNOTATION_LINE,
+                    C_ANNOTATION_TYPE.C_ANNOTATION_POLYLINE,
+                    C_ANNOTATION_TYPE.C_ANNOTATION_POLYGON,
+                };
                 if (list.Contains(e.annotType))
                 {
                     viewerTool.DrawEndEditAnnot();
@@ -2240,11 +2240,14 @@ namespace ComPDFKit.Tool
                         }
                         else
                         {
-                            viewerTool.CleanEditAnnot();
-                            viewerTool.DrawStartSelectedRect();
-                            if (currentToolType == ToolType.WidgetEdit)
+                            if(currentToolType != ToolType.Viewer)
                             {
-                                viewerTool.MoveDrawWidget(true);
+                                viewerTool.CleanEditAnnot();
+                                viewerTool.DrawStartSelectedRect();
+                                if (currentToolType == ToolType.WidgetEdit)
+                                {
+                                    viewerTool.MoveDrawWidget(true);
+                                }
                             }
                         }
                     }