Selaa lähdekoodia

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

OYXH\oyxh 1 vuosi sitten
vanhempi
commit
364059f481
1 muutettua tiedostoa jossa 15 lisäystä ja 2 poistoa
  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);
+                            }
+
+                        }
+
+                    }
+                       
                 }
                    
             }