Skip to content

Commit d3ae4a2

Browse files
committed
Fix bug in refactoring of user settings.
Will be cherry-picked into refactor-user-settings-location.
1 parent c279fd8 commit d3ae4a2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Source/Orts.Settings/TelemetrySettings.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@ namespace ORTS.Settings
2222
{
2323
public class TelemetrySettings : PropertySettingsBase
2424
{
25+
public static readonly string SectionName = "Telemetry";
26+
2527
[Default(0)]
2628
public int RandomNumber1000 { get; set; }
2729
[Default("https://telemetry.openrails.org")]
2830
public string ServerURL { get; set; }
2931
public DateTime StateSystem { get; set; }
3032

3133
public TelemetrySettings()
32-
: base(SettingsStore.GetSettingStore(UserSettings.SettingsFilePath, UserSettings.RegistryKey, "Telemetry"))
34+
: base(SettingsStore.GetSettingStore(UserSettings.SettingsFilePath, UserSettings.RegistryKey, SectionName))
3335
{
3436
Load(new string[0]);
3537
}

Source/Orts.Settings/UserSettings.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ public override void ChangeSettingsStore(string filePath, string registryKey, st
525525
Input.ChangeSettingsStore(filePath, registryKey, InputSettings.SectionName);
526526
RailDriver.ChangeSettingsStore(filePath, registryKey, RailDriverSettings.SectionName);
527527
Content.ChangeSettingsStore(filePath, registryKey, ContentSettings.SectionName);
528-
Telemetry.ChangeSettingsStore(filePath, registryKey, ContentSettings.SectionName);
528+
Telemetry.ChangeSettingsStore(filePath, registryKey, TelemetrySettings.SectionName);
529529
}
530530
}
531531
}

0 commit comments

Comments
 (0)