mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-19 15:02:15 +01:00
feat(start): starting with unsaved settings asks first
Edits on the settings page (or of the keys) not saved yet: the start asks whether to save them and start, start without them, or not start. Closing the question starts nothing. "Start without saving settings" from the menu asks nothing, as it says what it does.
This commit is contained in:
@@ -1482,9 +1482,12 @@ public partial class Settings : UserControl, ISettingsCapture
|
||||
UpdateSaveState();
|
||||
}
|
||||
|
||||
/// <summary>Edits on the page, or of the keys, not saved yet: what "Niezapisane zmiany" tells.</summary>
|
||||
public bool HasUnsavedChanges => _dirty || KeyboardConfig.Instance.Dirty;
|
||||
|
||||
private void UpdateSaveState()
|
||||
{
|
||||
bool dirty = _dirty || KeyboardConfig.Instance.Dirty;
|
||||
bool dirty = HasUnsavedChanges;
|
||||
SaveButton.Classes.Set("Accent", dirty);
|
||||
SaveStatus.Text = dirty ? App.Loc["UnsavedChanges"] : string.Empty;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user