mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-19 15:02:15 +01:00
fix(start): discarding unsaved settings lets go of the page's edits only, a failed key save starts nothing
- the page shows the settings as held again, not read from the file as Restore does, so what other pages set and not yet saved (the depot's filters, the window maximized) stays - the start goes on only once nothing is left to be saved, the keys' file included
This commit is contained in:
@@ -1151,10 +1151,7 @@ public partial class Settings : UserControl, ISettingsCapture
|
||||
ThumbnailSizeChanged?.Invoke();
|
||||
}
|
||||
|
||||
private void ResetButton_OnClick(object? sender, RoutedEventArgs e) => DiscardChanges();
|
||||
|
||||
/// <summary>The edits not saved let go, the page and the keys as the files have them: "Przywróć".</summary>
|
||||
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();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public void DiscardEdits()
|
||||
{
|
||||
ApplyToUi();
|
||||
_keyBindings.Reload();
|
||||
_dirty = false;
|
||||
UpdateSaveState();
|
||||
}
|
||||
|
||||
/// <summary>The list as <see cref="ResolutionChoices"/> has it for the monitors there are now, with the size selected.</summary>
|
||||
private void SelectResolution(int width, int height)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user