3
0

2 Revīzijas a7231125a1 ... 8525049312

Autors SHA1 Ziņojums Datums
  liyijie 8525049312 Merge branch 'compdfkit_demo_win_dev' of http://git.kdan.cc:8865/Others/kmpdfkit_demo into compdfkit_demo_win_dev 2 mēneši atpakaļ
  liyijie 7a1c0e5d91 ComPDF.Tool(Win)-常规模式下字符在图片上,字符无法选择问题修复 2 mēneši atpakaļ
1 mainītis faili ar 13 papildinājumiem un 10 dzēšanām
  1. 13 10
      Demo/Examples/ComPDFKit.Tool/CPDFViewerTool.xaml.cs

+ 13 - 10
Demo/Examples/ComPDFKit.Tool/CPDFViewerTool.xaml.cs

@@ -462,7 +462,7 @@ namespace ComPDFKit.Tool
             }
             else if ((currentModel == ToolType.Pan || currentModel == ToolType.Viewer))
             {
-                if (DrawDownSelectImage(true))
+                if (!IsText() && DrawDownSelectImage(true))
                 {
                     mouseEventObject.hitTestType = MouseHitTestType.ImageSelect;
                 }
@@ -484,7 +484,7 @@ namespace ComPDFKit.Tool
                         if (AnnotSelectGetCount() == 0 && hitWidget != null)
                         {
                             AnnotSelectAddItem(hitWidget.GetAnnotData());
-                            cacheHitTestAnnot=hitWidget;
+                            cacheHitTestAnnot = hitWidget;
                             SelectedAnnot();
                         }
 
@@ -602,7 +602,7 @@ namespace ComPDFKit.Tool
             }
             if (currentModel == ToolType.WidgetEdit)
             {
-                bool areaSelectAdd=AnnotSelectAreaSelect(true);
+                bool areaSelectAdd = AnnotSelectAreaSelect(true);
                 if (AnnotWidgetHitTest())
                 {
                     BaseWidget checkItem = PDFViewer?.AnnotHitTest() as BaseWidget;
@@ -612,7 +612,7 @@ namespace ComPDFKit.Tool
                 {
                     CleanSelectedRect();
                 }
-                if(IsMoved==false && AnnotSelectAreaHitTest()==false && AnnotWidgetHitTest()==false)
+                if (IsMoved == false && AnnotSelectAreaHitTest() == false && AnnotWidgetHitTest() == false)
                 {
                     AnnotSelectClean();
                 }
@@ -639,7 +639,7 @@ namespace ComPDFKit.Tool
                     }
                 }
             }
-          
+
             MouseEventObject mouseEventObject = new MouseEventObject
             {
                 mouseButtonEventArgs = e,
@@ -667,7 +667,7 @@ namespace ComPDFKit.Tool
                 AnnotSelectUpdate();
                 AnnotSelectDraw();
                 AnnotSelectSave();
-                AreaMoveData=new AnnotSelectAreaData();
+                AreaMoveData = new AnnotSelectAreaData();
             }
             IsMoved = false;
         }
@@ -741,7 +741,10 @@ namespace ComPDFKit.Tool
                     caheMoveAnnot = null;
                     if ((currentModel == ToolType.Pan || currentModel == ToolType.Viewer))
                     {
-                        DrawMoveSelectImage();
+                        if (GetTextSelectInfo() == null)
+                        {
+                            DrawMoveSelectImage();
+                        }
                     }
                 }
             }
@@ -784,7 +787,7 @@ namespace ComPDFKit.Tool
                 }
             }
 
-            if(currentModel==ToolType.WidgetEdit)
+            if (currentModel == ToolType.WidgetEdit)
             {
                 AnnotSelectAreaDraw();
                 if (!AnnotSelectMoveDraw())
@@ -792,7 +795,7 @@ namespace ComPDFKit.Tool
                     AnnotSelectAreaHover();
                 }
             }
-           
+
             MouseMoveHandler?.Invoke(this, mouseEventObject);
             PDFViewer.SetCustomMousePoint(Mouse.GetPosition(this).Y, Mouse.GetPosition(this).X);
             if (oldCursor != newCursor)
@@ -948,7 +951,7 @@ namespace ComPDFKit.Tool
                             default:
                                 break;
                         }
-                    } 
+                    }
                 }
             }
             else