mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-19 15:02:15 +01:00
Save a profile without taking it for a save of eu07.ini
A profile went through the save of eu07.ini with another path: what the store holds of the file took the changes the file never got, and the list of changes was empty after it. A profile is now written as an export, from a copy. Like a save, an export is not written from defaults when the settings could not be read.
This commit is contained in:
@@ -235,13 +235,13 @@ public partial class Settings : UserControl, ISettingsCapture
|
||||
App.Loc["ProfileSaveAs"], MessageBoxButtons.YesNo))
|
||||
return;
|
||||
|
||||
var store = AppServices.Current.SettingsStore;
|
||||
// Written beside the user's own eu07.ini, which stays as it is.
|
||||
CaptureInto(AppServices.Current.Settings);
|
||||
store.SaveTo(path);
|
||||
bool saved = AppServices.Current.SettingsStore.ExportTo(path);
|
||||
PopulateProfileCombo();
|
||||
int idx = FindComboIndexByContent(ProfileCb, Path.GetFileNameWithoutExtension(path));
|
||||
if (idx >= 0) ProfileCb.SelectedIndex = idx;
|
||||
SaveStatus.Text = string.Format(App.Loc[store.LastSaveFailed ? "ProfileNotSaved" : "ProfileSaved"], name);
|
||||
SaveStatus.Text = string.Format(App.Loc[saved ? "ProfileSaved" : "ProfileNotSaved"], name);
|
||||
}
|
||||
|
||||
private void PopulateExeCombo()
|
||||
|
||||
Reference in New Issue
Block a user