Browse Source

空白 右键菜单 bug

OYXH\oyxh 1 year ago
parent
commit
a69274847d
1 changed files with 4 additions and 3 deletions
  1. 4 3
      PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Layout.cs

+ 4 - 3
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Layout.cs

@@ -106,9 +106,9 @@ namespace PDF_Office.ViewModels.Tools
             contextMenu.DataContext = viewContentViewModel;
             if (contextMenu.Items.Count > 0)
             {
-                int index = PDFViewer.CurrentIndex;
-                
-                //检测是否已存在相同数据
+                int index = PDFViewer.CurrentIndex;
+
+                //检测是否已存在相同数据
                 CPDFBookmark list = PDFViewer.Document.GetBookmarkList().FirstOrDefault(q => q.PageIndex == index);
                 if (list != null)
                 {
@@ -229,6 +229,7 @@ namespace PDF_Office.ViewModels.Tools
                                 if (OpenFileInfo != null)
                                 {
                                     menuItem1.IsChecked = OpenFileInfo.ShowHighLightLink;
+                                    HighlightLinks_Click(menuItem1, null);
                                 }
                                 menuItem1.Click -= HighlightLinks_Click;
                                 menuItem1.Click += HighlightLinks_Click;