From 11be9e16f569d1c6d320a7be028be3bbe2daf9ea Mon Sep 17 00:00:00 2001 From: John Lewin Date: Sat, 29 Aug 2020 13:35:52 -0700 Subject: [PATCH] Ensure icon is loaded after .InvertIcons property is deserialized - Issue MatterHackers/MatterControl#4826 Thumbnail generating icon is not theme aware --- MatterControlLib/ApplicationView/Themes/ThemeConfig.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MatterControlLib/ApplicationView/Themes/ThemeConfig.cs b/MatterControlLib/ApplicationView/Themes/ThemeConfig.cs index d550a5983..9cc4905e4 100644 --- a/MatterControlLib/ApplicationView/Themes/ThemeConfig.cs +++ b/MatterControlLib/ApplicationView/Themes/ThemeConfig.cs @@ -238,6 +238,9 @@ namespace MatterHackers.MatterControl // { // this.BedColor = this.ResolveColor(this.BackgroundColor, Color.Gray.WithAlpha(60)); // } + + // EnsureDefaults is called after deserialization and at a point when state should be fully loaded. Invoking RebuildTheme here ensures icons are inverted correctly + this.RebuildTheme(); } public Color RowBorder { get; set; }