Prep work on slice settings layering.
This commit is contained in:
parent
2832653ecb
commit
f1ac2fe746
2 changed files with 24 additions and 0 deletions
|
|
@ -340,6 +340,24 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
|
||||
return "Unknown";
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns whether or not the setting is overridden by the active layer
|
||||
/// </summary>
|
||||
/// <param name="sliceSetting"></param>
|
||||
/// <returns></returns>
|
||||
public bool SettingExistsInLayer(string sliceSetting, int layer=0)
|
||||
{
|
||||
bool settingExistsInLayer;
|
||||
if (layer < activeSettingsLayers.Count)
|
||||
{
|
||||
settingExistsInLayer = (activeSettingsLayers[layer].settingsDictionary.ContainsKey(sliceSetting));
|
||||
}
|
||||
else
|
||||
{
|
||||
settingExistsInLayer = false;
|
||||
}
|
||||
return settingExistsInLayer;
|
||||
}
|
||||
|
||||
public Vector2 GetActiveVector2(string sliceSetting)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,6 +23,12 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
}
|
||||
}
|
||||
|
||||
public int ActiveLayerIndex
|
||||
{
|
||||
get { return activeLayerIndex; }
|
||||
}
|
||||
|
||||
|
||||
public void SaveSetting(string settingKey, string settingValue)
|
||||
{
|
||||
ActiveSliceSettings.Instance.SaveValue(settingKey, settingValue, this.activeLayerIndex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue