From 08478a266374c95259d1d4da29005275a4397f2d Mon Sep 17 00:00:00 2001 From: Jake Norbut Date: Wed, 28 Aug 2019 08:01:23 -0500 Subject: [PATCH] don't skip new bool when serializing settings to disk --- .../Controls/DIYGrid/Settings/SimpleGridSettingsVM.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/client/spark/view/Controls/DIYGrid/Settings/SimpleGridSettingsVM.cs b/src/client/spark/view/Controls/DIYGrid/Settings/SimpleGridSettingsVM.cs index e90fda0da..c6e0b48f5 100644 --- a/src/client/spark/view/Controls/DIYGrid/Settings/SimpleGridSettingsVM.cs +++ b/src/client/spark/view/Controls/DIYGrid/Settings/SimpleGridSettingsVM.cs @@ -107,9 +107,15 @@ namespace mbts.spark { } } + // Note that one of the responsibilites of create() is via instance_vm.get_result() in the ShellSettingsDialogVM.export_to_custom_cmd, + // which is what handles saving .grid files. This means if you have introduced any optional args, say for example enable_background_color + // that is not yet a feature of all windows at this point in time, 8/28/2019, you need to be sure it's explicity set if the proto + // constructor parameter default has been initialized to different default value. public GridSettings create() => - new GridSettings(font_family.name(), font_size, font_weight, font_color.color.rgb_color(), selection_highlight.to_proto(), columns.Select(c => c.create()), - background_color: show_background_color ? background_color.color.rgb_color() : GridSettings.FallbackValues.background_color); + new GridSettings(font_family.name(), font_size, font_weight, font_color.color.rgb_color(), selection_highlight.to_proto(), + columns.Select(c => c.create()), + background_color: show_background_color ? background_color.color.rgb_color() : GridSettings.FallbackValues.background_color, + enable_background_color: show_background_color); public void load_from(GridSettings value) { if (value == null)