소스 검색

孙浩楠-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)
                 {