|
@@ -298,17 +298,26 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
|
|
|
private void SearchTog_Checked(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
+ if (pdfView.UndoManager.CanSave)
|
|
|
+ {
|
|
|
+ pdfView.Document.WriteToLoadedPath();
|
|
|
+ pdfView.UndoManager.CanSave = false;
|
|
|
+ }
|
|
|
ReplaceTog.IsChecked = false;
|
|
|
SearchInput.InputGrid.RowDefinitions[1].Height = new GridLength(0);
|
|
|
SearchInput.Height = 40;
|
|
|
ReplaceBorder.Visibility = Visibility.Collapsed;
|
|
|
SearchResult.Visibility = Visibility.Visible;
|
|
|
- ResultBorder.Visibility = Visibility.Visible;
|
|
|
-
|
|
|
+ ResultBorder.Visibility = Visibility.Visible;
|
|
|
}
|
|
|
|
|
|
private void ReplaceTog_Checked(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
+ if (pdfView.UndoManager.CanSave)
|
|
|
+ {
|
|
|
+ pdfView.Document.WriteToLoadedPath();
|
|
|
+ pdfView.UndoManager.CanSave = false;
|
|
|
+ }
|
|
|
SearchTog.IsChecked = false;
|
|
|
SearchInput.InputGrid.RowDefinitions[1].Height = new GridLength(1, GridUnitType.Star);
|
|
|
SearchInput.Height = 80;
|
|
@@ -321,7 +330,6 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
private void ReplaceCurrent_Click(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
pdfView.ReplaceText(SearchInput.ReplaceWord);
|
|
|
- pdfView.Document.WriteToLoadedPath();
|
|
|
}
|
|
|
|
|
|
private void ReplaceAll_Click(object sender, RoutedEventArgs e)
|