OYXH\oyxh 2 éve
szülő
commit
e637ad9818

+ 3 - 4
PDF Office/ViewModels/PropertyPanel/AnnotPanel/LinkAnnotPropertyViewModel.cs

@@ -767,7 +767,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private async void PDFViewer_CustomNotifyHandler(object sender, CustomNotityData e)
+        private  void PDFViewer_CustomNotifyHandler(object sender, CustomNotityData e)
         {
             if (e.NotifyType == CustomNotifyType.LinkAreaLocate)
             {
@@ -797,12 +797,10 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
                         AnnotAttribEvent?.UpdateAnnot();
                         LinkAnnotArgs.InvokeLinkSaveCalled(this, EventArgs.Empty);
 
-                        
                         pdfViewer.GoToPage(historyPageIndex);
 
-                        if (string.IsNullOrEmpty(PageNumTextContent) || PageNumTextContent != (areaInfo.PageIndex + 1).ToString())
+                        if (string.IsNullOrEmpty(PageNumTextContent))
                         {
-                            await System.Threading.Tasks.Task.Delay(5);
                             pdfViewer.SelectAnnotation(historyPageIndex, LinkAnnotArgs.AnnotIndex);
                         }
 
@@ -820,6 +818,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
                         {
                             pdfViewer.SetMouseMode(MouseModes.PanTool);
                             propertyPanel.IsLocationLink = false;
+                            pdfViewer.SelectAnnotation(historyPageIndex, LinkAnnotArgs.AnnotIndex);
                         }
                     }
                 }