diff --git a/src/ViewModels/SettingsViewModel.cs b/src/ViewModels/SettingsViewModel.cs
index 52cc762..7a6ebd6 100644
--- a/src/ViewModels/SettingsViewModel.cs
+++ b/src/ViewModels/SettingsViewModel.cs
@@ -63,6 +63,7 @@ class SettingsViewModel: ChangeNotifier
{
_settings.OutputPdfDir = value;
NotifyPropertyChanged();
+ NotifyPropertyChanged(nameof(IsOutputPdfDirValid));
}
}
@@ -122,6 +123,14 @@ class SettingsViewModel: ChangeNotifier
public void Save()
{
- DialogHost.Close("DialogHost", _settings);
+ if (!IsOutputPdfDirValid)
+ {
+ ErrorMessage = "Output directory cannot be found!";
+ }
+ else
+ {
+ ErrorMessage = "";
+ DialogHost.Close("DialogHost", _settings);
+ }
}
}
\ No newline at end of file
diff --git a/src/Views/SettingsView.axaml b/src/Views/SettingsView.axaml
index d163d9f..81746bd 100644
--- a/src/Views/SettingsView.axaml
+++ b/src/Views/SettingsView.axaml
@@ -20,7 +20,7 @@
FontWeight="Bold" />
+ Width="350">
Always reduce size of images if above this file size in megabytes (MB):
Use legacy PDF handling (does not work with macOS annotations)
Always save report PDF in working directory
-
+