|
@@ -191,16 +191,19 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
rect.Top * PDFViewer.ZoomFactor,
|
|
|
rect.Width * PDFViewer.ZoomFactor,
|
|
|
rect.Height * PDFViewer.ZoomFactor);
|
|
|
- var ui = PDFViewer.Parent as ContentControl;
|
|
|
- if (ui != null)
|
|
|
- {
|
|
|
- var point = e.GetPosition(ui);
|
|
|
- int pageIndex = 0;
|
|
|
- Point pagePoint = new Point(0, 0);
|
|
|
+ if (PDFViewer.Parent is ContentControl ui)
|
|
|
+ {
|
|
|
+ //var ui = PDFViewer.Parent as ContentControl;
|
|
|
+ if (ui != null)
|
|
|
+ {
|
|
|
+ var point = e.GetPosition(ui);
|
|
|
+ int pageIndex = 0;
|
|
|
+ Point pagePoint = new Point(0, 0);
|
|
|
|
|
|
- PDFViewer.ConvertViewPointToPage(point, out pageIndex, out pagePoint);
|
|
|
- if (pagePoint.X >= rect.Left && pagePoint.X <= rect.Right && pagePoint.Y >= rect.Top && pagePoint.Y <= rect.Bottom)
|
|
|
- PopAnnotNoteText(CurrentSelectedAnnot);
|
|
|
+ PDFViewer.ConvertViewPointToPage(point, out pageIndex, out pagePoint);
|
|
|
+ if (pagePoint.X >= rect.Left && pagePoint.X <= rect.Right && pagePoint.Y >= rect.Top && pagePoint.Y <= rect.Bottom)
|
|
|
+ PopAnnotNoteText(CurrentSelectedAnnot);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1560,8 +1563,8 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
{
|
|
|
if (CurrentSelectedAnnot.EventType == AnnotArgsType.AnnotSquare)
|
|
|
{
|
|
|
- CurrentSelectedAnnot.PageIndex = -1;
|
|
|
- CurrentSelectedAnnot.AnnotIndex = -1;
|
|
|
+ //CurrentSelectedAnnot.PageIndex = -1;
|
|
|
+ //CurrentSelectedAnnot.AnnotIndex = -1;
|
|
|
CurrentSelectedAnnot.ClientRect = Rect.Empty;
|
|
|
annots.Add(CurrentSelectedAnnot);
|
|
|
}
|
|
@@ -1588,8 +1591,8 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
{
|
|
|
if (CurrentSelectedAnnot.EventType == AnnotArgsType.AnnotCircle)
|
|
|
{
|
|
|
- CurrentSelectedAnnot.PageIndex = -1;
|
|
|
- CurrentSelectedAnnot.AnnotIndex = -1;
|
|
|
+ //CurrentSelectedAnnot.PageIndex = -1;
|
|
|
+ //CurrentSelectedAnnot.AnnotIndex = -1;
|
|
|
CurrentSelectedAnnot.ClientRect = Rect.Empty;
|
|
|
annots.Add(CurrentSelectedAnnot);
|
|
|
}
|
|
@@ -1617,8 +1620,8 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
{
|
|
|
if (CurrentSelectedAnnot.EventType == AnnotArgsType.AnnotLine)
|
|
|
{
|
|
|
- CurrentSelectedAnnot.PageIndex = -1;
|
|
|
- CurrentSelectedAnnot.AnnotIndex = -1;
|
|
|
+ //CurrentSelectedAnnot.PageIndex = -1;
|
|
|
+ //CurrentSelectedAnnot.AnnotIndex = -1;
|
|
|
CurrentSelectedAnnot.ClientRect = Rect.Empty;
|
|
|
if (CurrentSelectedAnnot is LineAnnotArgs lineAnnotArgs)
|
|
|
{
|