瀏覽代碼

Merge branch 'dev' of http://git.kdan.cc:8865/Windows/PDFOffice_Windows_exe into dev

OYXH\oyxh 1 年之前
父節點
當前提交
364059f481
共有 1 個文件被更改,包括 15 次插入2 次删除
  1. 15 2
      PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Command.cs

+ 15 - 2
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Command.cs

@@ -155,8 +155,21 @@ namespace PDF_Office.ViewModels.Tools
                     var type = CurrentSelectedAnnot.EventType;
                     if (type != AnnotArgsType.AnnotSticky && type != AnnotArgsType.AnnotFreeText &&
                         type != AnnotArgsType.AnnotHighlight && type != AnnotArgsType.AnnotUnderline && type != AnnotArgsType.AnnotStrikeout)
-                  
-                        PopAnnotNoteText(CurrentSelectedAnnot);
+                    {
+                        var rect = CurrentSelectedAnnot.ClientRect;
+                        var ui = PDFViewer.Parent as ContentControl;
+                        if (ui != null)
+                        {
+                            var point = e.GetPosition(ui);
+                            if (rect.Left < point.X && rect.Top < point.Y && (rect.Width + rect.X) >= point.X && (rect.Height + rect.Y) >= point.Y)
+                            {
+                                PopAnnotNoteText(CurrentSelectedAnnot);
+                            }
+
+                        }
+
+                    }
+                       
                 }
                    
             }