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)
This commit is contained in:
Krowe Moh 2026-03-23 23:20:10 +11:00
parent 88f3c39eca
commit 0d3a08cbc9
3 changed files with 3 additions and 9 deletions

View File

@ -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;

View File

@ -700,7 +700,7 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="* Require a restart for changes to take effect"
<TextBlock Grid.Column="0" Text="* May Require a restart for changes to take effect"
HorizontalAlignment="Right" VerticalAlignment="Center" FontSize="11" Margin="0 0 10 0"
Foreground="{DynamicResource {x:Static adonisUi:Brushes.Layer1InteractionForegroundBrush}}" />
<Button Grid.Column="1" MinWidth="78" Margin="0 0 12 0" IsDefault="True" IsCancel="False"

View File

@ -61,6 +61,8 @@ public partial class SettingsView
_applicationView.CUE4Parse.Provider.ReadScriptData = UserSettings.Default.ReadScriptData;
_applicationView.CUE4Parse.Provider.ReadShaderMaps = UserSettings.Default.ReadShaderMaps;
UserSettings.Save();
}
private void OnBrowseOutput(object sender, RoutedEventArgs e)