Extract profile management to ProfileManager class
- Use on disk profiles.json - Support MarkedForDelete functionality - Issue #930
This commit is contained in:
parent
1a84cb7a4c
commit
4e74156521
12 changed files with 100 additions and 298 deletions
|
|
@ -1203,14 +1203,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
{
|
||||
if (doDelete)
|
||||
{
|
||||
SettingsProfile activePrinter = ActiveSliceSettings.Instance;
|
||||
|
||||
string printerID = activePrinter.ID;
|
||||
var printerInfo = ActiveSliceSettings.ProfileData.Profiles.Where(profile => profile.Id == printerID).FirstOrDefault();
|
||||
if(printerInfo != null)
|
||||
{
|
||||
ActiveSliceSettings.ProfileData.Profiles.Remove(printerInfo);
|
||||
}
|
||||
ActiveSliceSettings.Instance.SetMarkedForDelete(true);
|
||||
}
|
||||
}, "Are you sure you want to delete your currently selected printer?".Localize(), "Delete Printer?".Localize(), StyledMessageBox.MessageType.YES_NO, "Delete Printer".Localize());
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue