Explorar el Código

孙浩楠-bug 1469

zhuyi hace 1 año
padre
commit
1ea251fea9

+ 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)
                 {