Better integrate new Presets editor
- Fixes #718 - Presets editor is hard-coded to show Material presets - Fixes #719 - Name field in presets editor is incorrect - Fixes #721 - Wire up "Add Preset"
This commit is contained in:
parent
64584ba88b
commit
f314731449
7 changed files with 88 additions and 603 deletions
|
|
@ -171,6 +171,23 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
return layeredProfile.GetMaterialLayer(key);
|
||||
}
|
||||
|
||||
internal SettingsLayer CreatePresetsLayer(NamedSettingsLayers layerType)
|
||||
{
|
||||
SettingsLayer newLayer = new SettingsLayer();
|
||||
if (layerType == NamedSettingsLayers.Quality)
|
||||
{
|
||||
newLayer.Name = "Quality" + layeredProfile.QualityLayers.Count;
|
||||
layeredProfile.QualityLayers[newLayer.Name] = newLayer;
|
||||
}
|
||||
else
|
||||
{
|
||||
newLayer.Name = "Material" + layeredProfile.MaterialLayers.Count;
|
||||
layeredProfile.MaterialLayers[newLayer.Name] = newLayer;
|
||||
}
|
||||
|
||||
return newLayer;
|
||||
}
|
||||
|
||||
internal SettingsLayer QualityLayer(string key)
|
||||
{
|
||||
return layeredProfile.GetQualityLayer(key);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue