Fixed a problem with create new printer
This commit is contained in:
parent
3cabfb3985
commit
b6dcacdef9
4 changed files with 15 additions and 8 deletions
|
|
@ -123,14 +123,21 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
{
|
||||
if (ActiveSliceSettings.Instance.PrinterSelected)
|
||||
{
|
||||
string activeThemeName = ActiveSliceSettings.Instance.GetValue(SettingsKey.active_theme_name);
|
||||
if (string.IsNullOrEmpty(activeThemeName))
|
||||
string activeThemeName = "Blue - Light";
|
||||
if (ActiveSliceSettings.Instance.Contains(SettingsKey.active_theme_name))
|
||||
{
|
||||
activeThemeName = "Blue - Light";
|
||||
activeThemeName = ActiveSliceSettings.Instance.GetValue(SettingsKey.active_theme_name);
|
||||
if (string.IsNullOrEmpty(activeThemeName))
|
||||
{
|
||||
activeThemeName = "Blue - Light";
|
||||
}
|
||||
if (!doReloadEvent)
|
||||
{
|
||||
ActiveTheme.SuspendEvents();
|
||||
}
|
||||
}
|
||||
if (!doReloadEvent)
|
||||
else
|
||||
{
|
||||
ActiveTheme.SuspendEvents();
|
||||
}
|
||||
ActiveTheme.Instance = ActiveTheme.GetThemeColors(activeThemeName);
|
||||
ActiveTheme.ResumeEvents();
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
// Set initial theme to current theme
|
||||
try
|
||||
{
|
||||
string name = ThemeIndexNameMapping[int.Parse(ActiveSliceSettings.Instance.GetValue("active_theme_index"))];
|
||||
string name = ThemeIndexNameMapping[ActiveSliceSettings.Instance.GetValue<int>("active_theme_index")];
|
||||
newProfile.SetValue(SettingsKey.active_theme_name, name);
|
||||
}
|
||||
catch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue