diff --git a/StarterNG/MainWindow.axaml.cs b/StarterNG/MainWindow.axaml.cs
index f978000..6f75ceb 100644
--- a/StarterNG/MainWindow.axaml.cs
+++ b/StarterNG/MainWindow.axaml.cs
@@ -619,11 +619,12 @@ public partial class MainWindow : Window
if (save is null)
return;
if (save == false)
- SettingsView.DiscardChanges();
+ SettingsView.DiscardEdits();
else
{
SettingsView.Save();
- if (AppServices.Current.SettingsStore.LastSaveFailed)
+ // eu07.ini or the keys' file not written: still there to be saved
+ if (SettingsView.HasUnsavedChanges)
{
await MessageBox.Show(this, App.Loc["SettingsNotSaved"], App.Loc["UnsavedChanges"],
MessageBoxButtons.Ok);
diff --git a/StarterNG/Views/Settings.axaml.cs b/StarterNG/Views/Settings.axaml.cs
index c47af0d..0b9e00d 100644
--- a/StarterNG/Views/Settings.axaml.cs
+++ b/StarterNG/Views/Settings.axaml.cs
@@ -1151,10 +1151,7 @@ public partial class Settings : UserControl, ISettingsCapture
ThumbnailSizeChanged?.Invoke();
}
- private void ResetButton_OnClick(object? sender, RoutedEventArgs e) => DiscardChanges();
-
- /// The edits not saved let go, the page and the keys as the files have them: "Przywróć".
- public void DiscardChanges()
+ private void ResetButton_OnClick(object? sender, RoutedEventArgs e)
{
AppServices.Current.SettingsStore.Load();
ApplyToUi();
@@ -1164,6 +1161,18 @@ public partial class Settings : UserControl, ISettingsCapture
UpdateSaveState();
}
+ ///
+ /// The page's own edits let go, and the keys': the page shows the settings as held. Not read again from the file
+ /// as "Restore" does - what other pages set and not yet saved (a filter of the depot, the window maximized) stays.
+ ///
+ public void DiscardEdits()
+ {
+ ApplyToUi();
+ _keyBindings.Reload();
+ _dirty = false;
+ UpdateSaveState();
+ }
+
/// The list as has it for the monitors there are now, with the size selected.
private void SelectResolution(int width, int height)
{