Changed TryGetValue to ContainsKey for clarity

This commit is contained in:
Matt Moening 2016-08-11 13:01:34 -07:00
parent bdf3e8f2a5
commit 5b8ff5cd29
2 changed files with 2 additions and 3 deletions

View file

@ -594,7 +594,7 @@ namespace MatterHackers.MatterControl
if(activeSettings.Contains(item.Key))
{
containsValidSetting = true;
string currentValue = activeSettings.GetValue(item.Key, null).Trim();
string currentValue = activeSettings.GetValue(item.Key).Trim();
// Compare the value to import to the layer cascade value and only set if different
if (currentValue != item.Value)
{

View file

@ -379,8 +379,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
}
foreach (PrinterSettingsLayer layer in layerCascade)
{
string value;
if (layer.TryGetValue(sliceSetting, out value))
if (layer.ContainsKey(sliceSetting))
{
return true;
}