From 0d3a08cbc914affadfbf79da3043616da2c650c7 Mon Sep 17 00:00:00 2001
From: Krowe Moh <27891447+Krowe-moh@users.noreply.github.com>
Date: Mon, 23 Mar 2026 23:20:10 +1100
Subject: [PATCH] Prevent restarts on every setting change
All these do not need a full application restart as it updates instantly without problems, such as if you were on the wrong texture platform you can just change it and it will apply the change.
Haven't tested MapStructTypes, but all the others work and mapstruct should.
Added a Setting save right after the user clicks Ok to prevent lost changes (fmodel crash)
---
FModel/ViewModels/SettingsViewModel.cs | 8 --------
FModel/Views/SettingsView.xaml | 2 +-
FModel/Views/SettingsView.xaml.cs | 2 ++
3 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/FModel/ViewModels/SettingsViewModel.cs b/FModel/ViewModels/SettingsViewModel.cs
index becbf3a2..2a27f836 100644
--- a/FModel/ViewModels/SettingsViewModel.cs
+++ b/FModel/ViewModels/SettingsViewModel.cs
@@ -301,14 +301,6 @@ public class SettingsViewModel : ViewModel
whatShouldIDo.Add(SettingsOut.ReloadMappings);
if (_ueGameSnapshot != SelectedUeGame || _customVersionsSnapshot != SelectedCustomVersions ||
- _uePlatformSnapshot != SelectedUePlatform || _optionsSnapshot != SelectedOptions || // combobox
- _mapStructTypesSnapshot != SelectedMapStructTypes ||
- _outputSnapshot != UserSettings.Default.OutputDirectory || // textbox
- _rawDataSnapshot != UserSettings.Default.RawDataDirectory || // textbox
- _propertiesSnapshot != UserSettings.Default.PropertiesDirectory || // textbox
- _textureSnapshot != UserSettings.Default.TextureDirectory || // textbox
- _audioSnapshot != UserSettings.Default.AudioDirectory || // textbox
- _modelSnapshot != UserSettings.Default.ModelDirectory || // textbox
_gameSnapshot != UserSettings.Default.GameDirectory) // textbox
restart = true;
diff --git a/FModel/Views/SettingsView.xaml b/FModel/Views/SettingsView.xaml
index 4f60506d..e3ed1e1b 100644
--- a/FModel/Views/SettingsView.xaml
+++ b/FModel/Views/SettingsView.xaml
@@ -700,7 +700,7 @@
-