|
@@ -14,6 +14,7 @@ using ComPDFKitViewer.Widget;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Diagnostics;
|
|
|
+using System.Threading.Tasks;
|
|
|
using System.Windows;
|
|
|
using System.Windows.Controls;
|
|
|
using System.Windows.Input;
|
|
@@ -319,6 +320,10 @@ namespace ComPDFKit.Tool
|
|
|
|
|
|
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
|
|
|
{
|
|
|
+ if (PDFViewer.IsRendering)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (isContinueCreateTextEdit)
|
|
|
{
|
|
|
if (lastSelectedRect != null)
|
|
@@ -578,6 +583,11 @@ namespace ComPDFKit.Tool
|
|
|
|
|
|
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
|
|
|
{
|
|
|
+ if (!PDFViewer.IsRendering)
|
|
|
+ {
|
|
|
+ // return;
|
|
|
+ }
|
|
|
+
|
|
|
if (PDFViewer == null || PDFViewer.CurrentRenderFrame == null)
|
|
|
{
|
|
|
return;
|
|
@@ -610,8 +620,13 @@ namespace ComPDFKit.Tool
|
|
|
ReleaseMouseCapture();
|
|
|
}
|
|
|
|
|
|
- protected override void OnMouseMove(MouseEventArgs e)
|
|
|
- {
|
|
|
+ protected override async void OnMouseMove(MouseEventArgs e)
|
|
|
+ {
|
|
|
+
|
|
|
+ if (PDFViewer.IsRendering)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (PDFViewer == null || PDFViewer.CurrentRenderFrame == null)
|
|
|
{
|
|
|
return;
|
|
@@ -870,7 +885,7 @@ namespace ComPDFKit.Tool
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else
|