Просмотр исходного кода

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

TangJinZhou 1 неделя назад
Родитель
Сommit
f0cc08218f
1 измененных файлов с 12 добавлено и 9 удалено
  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);
+                                }
                             }
                         }
                     }