Listen for SettingChanged and update profile name/port as needed

- Move behavior back into ProfileManager
- Issue MatterHackers/MCCentral#4600
Hardware tab not syncing name changes
This commit is contained in:
John Lewin 2018-11-16 14:42:27 -08:00
parent a15c98ea42
commit bbcc3018f6
3 changed files with 44 additions and 35 deletions

View file

@ -235,7 +235,12 @@ namespace MatterHackers.MatterControl.PrintLibrary
string settingsName = (e as StringEventArgs)?.Data;
if (settingsName != null && settingsName == SettingsKey.printer_name)
{
HardwareTreeView.CreatePrinterProfilesTree(printersNode, theme);
// Allow enough time for ProfileManager to respond and refresh its data
UiThread.RunOnIdle(() =>
{
HardwareTreeView.CreatePrinterProfilesTree(printersNode, theme);
}, .2);
this.Invalidate();
}
}