Rebuild printers droplist on ProfilesListChanged event

- Fixes list not refreshing after import
 - Issue MatterHackers/MCCentral#288
This commit is contained in:
John Lewin 2016-08-19 09:27:57 -07:00
parent c002338d5d
commit 7183cbf919
3 changed files with 16 additions and 14 deletions

View file

@ -741,15 +741,15 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
var button = buttonFactory.Generate("Delete Printer".Localize());
button.HAnchor = HAnchor.ParentCenter;
button.Click += (s, e) =>
{
StyledMessageBox.ShowMessageBox((doDelete) =>
{
if (doDelete)
{
ActiveSliceSettings.Instance.Helpers.SetMarkedForDelete(true);
}
}, "Are you sure you want to delete your currently selected printer?".Localize(), "Delete Printer?".Localize(), StyledMessageBox.MessageType.YES_NO, "Delete Printer".Localize());
};
{
StyledMessageBox.ShowMessageBox((doDelete) =>
{
if (doDelete)
{
ActiveSliceSettings.Instance.Helpers.SetMarkedForDelete(true);
}
}, "Are you sure you want to delete your currently selected printer?".Localize(), "Delete Printer?".Localize(), StyledMessageBox.MessageType.YES_NO, "Delete Printer".Localize());
};
dataArea.AddChild(button);
}