Fix Regression in user color preservation

- Setting color for a printer sets value in user settings
 - use UserSetting color as default for loading theme color
 - if Active slice settings dont have an active theme set it to default
 - If user setting  theme is null attempt to load OemColor preference and set as user setting theme
This commit is contained in:
Matt Moening 2016-10-10 12:55:14 -07:00
parent 362f2b429e
commit 076619d0eb
3 changed files with 22 additions and 3 deletions

View file

@ -425,7 +425,16 @@ namespace MatterHackers.MatterControl
{
if (string.IsNullOrEmpty(UserSettings.Instance.get(UserSettingsKey.ActiveThemeName)))
{
ActiveTheme.Instance = ActiveTheme.GetThemeColors("Blue - Light");
string oemColor = OemSettings.Instance.ThemeColor;
if(string.IsNullOrEmpty(oemColor))
{
ActiveTheme.Instance = ActiveTheme.GetThemeColors("Blue - Light");
}
else
{
UserSettings.Instance.set(UserSettingsKey.ActiveThemeName, oemColor);
ActiveTheme.Instance = ActiveTheme.GetThemeColors(oemColor);
}
}
else
{