From 50a954cf4d4f13467eeae6b62d2129b04c3c3dc2 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Wed, 12 Jan 2022 13:29:10 -0800 Subject: [PATCH] Change default for "comma-separated bulk data" The setting determines whether bulk data is displayed as an unbroken string of hex digits, or as "$xx,$xx,...". The latter is easier to read and should be the default. One place in the code did consider it to be the default, so if the config file didn't have a value for the setting, the settings UI would incorrectly show it as enabled. --- SourceGen/MainController.cs | 2 +- SourceGen/WpfGui/EditAppSettings.xaml.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SourceGen/MainController.cs b/SourceGen/MainController.cs index 7f82512..9dc3624 100644 --- a/SourceGen/MainController.cs +++ b/SourceGen/MainController.cs @@ -514,7 +514,7 @@ namespace SourceGen { mFormatterConfig.mLocalVariableLabelPrefix = settings.GetString(AppSettings.FMT_LOCAL_VARIABLE_PREFIX, string.Empty); mFormatterConfig.mCommaSeparatedDense = - settings.GetBool(AppSettings.FMT_COMMA_SEP_BULK_DATA, false); + settings.GetBool(AppSettings.FMT_COMMA_SEP_BULK_DATA, true); string chrDelCereal = settings.GetString(AppSettings.FMT_CHAR_DELIM, null); if (chrDelCereal != null) { diff --git a/SourceGen/WpfGui/EditAppSettings.xaml.cs b/SourceGen/WpfGui/EditAppSettings.xaml.cs index 659ebc6..aed3010 100644 --- a/SourceGen/WpfGui/EditAppSettings.xaml.cs +++ b/SourceGen/WpfGui/EditAppSettings.xaml.cs @@ -1104,11 +1104,11 @@ namespace SourceGen.WpfGui { DisplayPresets = new DisplayFormatPreset[AssemblerList.Count + 2]; DisplayPresets[0] = new DisplayFormatPreset(DisplayFormatPreset.ID_CUSTOM, (string)FindResource("str_PresetCustom"), string.Empty, string.Empty, - string.Empty, string.Empty, string.Empty, string.Empty, false, + string.Empty, string.Empty, string.Empty, string.Empty, true, ExpressionMode.Unknown); DisplayPresets[1] = new DisplayFormatPreset(DisplayFormatPreset.ID_DEFAULT, (string)FindResource("str_PresetDefault"), string.Empty, "l", "a:", "f:", - string.Empty, string.Empty, false, ExpressionMode.Common); + string.Empty, string.Empty, true, ExpressionMode.Common); for (int i = 0; i < AssemblerList.Count; i++) { AssemblerInfo asmInfo = AssemblerList[i]; AsmGen.IGenerator gen = AssemblerInfo.GetGenerator(asmInfo.AssemblerId);