Support for in-memory profile refresh without ActivePrinterChanged event
- Issue MatterHackers/MCCentral#178
This commit is contained in:
parent
8aac9090f2
commit
e0f66cd901
1 changed files with 14 additions and 0 deletions
|
|
@ -80,6 +80,20 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
}
|
||||
}
|
||||
|
||||
public static void RefreshActiveInstance(SettingsProfile updatedProfile)
|
||||
{
|
||||
bool themeChanged = activeInstance.GetValue("active_theme_index") != updatedProfile.GetValue("active_theme_index");
|
||||
|
||||
activeInstance = updatedProfile;
|
||||
|
||||
if (themeChanged)
|
||||
{
|
||||
SwitchToPrinterTheme(true);
|
||||
}
|
||||
|
||||
UiThread.RunOnIdle(ApplicationController.Instance.ReloadAdvancedControlsPanel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Switches to the ActivePrinter theme without firing the ThemeChanged event. This is useful when changing printers and
|
||||
/// allows the theme state to be updated before the ActivePrinterChanged event fires, resulting in a single ReloadAll
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue