Просмотр исходного кода

其他-焦点切换闪退问题

zhuyi 11 месяцев назад
Родитель
Сommit
a30beeb5b7

+ 0 - 1
Demo/Examples/Compdfkit_Tools/Common/BaseControl/PageNumberControl.xaml.cs

@@ -62,7 +62,6 @@ namespace Compdfkit_Tools.Common
             {
                 pdfView.GetCPDFViewer().GoToPage(pdfView.GetCPDFViewer().CurrentRenderFrame.PageIndex + 2, new Point(0, 0));
             }
-
         }
 
         private void PrevPageBorder_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)

+ 4 - 1
Demo/Examples/Compdfkit_Tools/PDFView/PDFViewControl/PDFViewControl.xaml.cs

@@ -436,7 +436,10 @@ namespace Compdfkit_Tools.PDFControl
                     FocusPDFViewTool = splitViewerTool;
                     break;
             }
-            FocusPDFViewToolChanged?.Invoke(this, EventArgs.Empty);
+            if (FocusPDFViewTool.IsLoaded&& FocusPDFViewTool.GetCPDFViewer()?.CurrentRenderFrame != null)
+            {
+                FocusPDFViewToolChanged?.Invoke(this, EventArgs.Empty);
+            }
         }
     }
 }