فهرست منبع

孙浩楠-bug 1469

zhuyi 1 سال پیش
والد
کامیت
1ea251fea9
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      Demo/Examples/Compdfkit_Tools/PageEdit/PDFPageInsert/CPDFPageInsertUI.xaml.cs

+ 5 - 1
Demo/Examples/Compdfkit_Tools/PageEdit/PDFPageInsert/CPDFPageInsertUI.xaml.cs

@@ -85,6 +85,10 @@ namespace Compdfkit_Tools.PDFControlUI
 
         private void InsertButton_Click(object sender, RoutedEventArgs e)
         {
+            if (string.IsNullOrEmpty(PageTextBox.Text))
+            {
+                InsertIndexChanged?.Invoke(null, -1);
+            }
             InsertEvent?.Invoke(null, EventArgs.Empty);
         }
 
@@ -152,7 +156,7 @@ namespace Compdfkit_Tools.PDFControlUI
             {
                 index = int.Parse(PageTextBox.Text);
             }
-            if (PageTextBox.Text != string.Empty)
+            if (index != -2)
             {
                 if (PageLocationComboBox.SelectedIndex == 0)
                 {