Explorar el Código

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

TangJinZhou hace 1 semana
padre
commit
f0cc08218f
Se han modificado 1 ficheros con 12 adiciones y 9 borrados
  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);
+                                }
                             }
                         }
                     }