Make sure settings get visually updated on new and delete
This commit is contained in:
parent
e81305daaa
commit
54a0001ef0
2 changed files with 19 additions and 9 deletions
|
|
@ -133,7 +133,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
printer.Settings.ActiveMaterialKey = "";
|
||||
printer.Settings.MaterialLayers.Remove(layerToEdit);
|
||||
printer.Settings.Save();
|
||||
RebuildDropDownList();
|
||||
RebuildDropDownList(true);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
|
||||
// Clear QualityKey after removing layer to ensure listeners see update
|
||||
printer.Settings.ActiveQualityKey = "";
|
||||
RebuildDropDownList();
|
||||
RebuildDropDownList(true);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -236,7 +236,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
|| (layerType == NamedSettingsLayers.Quality && stringEvent.Data == SettingsKey.active_quality_key)
|
||||
|| stringEvent.Data == SettingsKey.layer_name))
|
||||
{
|
||||
RebuildDropDownList();
|
||||
RebuildDropDownList(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -291,7 +291,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
printer.Settings.MaterialLayers.Add(newMaterial);
|
||||
printer.Settings.ActiveMaterialKey = newMaterial.LayerID;
|
||||
|
||||
RebuildDropDownList();
|
||||
RebuildDropDownList(true);
|
||||
},
|
||||
() =>
|
||||
{
|
||||
|
|
@ -300,7 +300,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
printer.Settings.MaterialLayers.Add(newMaterial);
|
||||
printer.Settings.ActiveMaterialKey = newMaterial.LayerID;
|
||||
|
||||
RebuildDropDownList();
|
||||
RebuildDropDownList(true);
|
||||
|
||||
editButton.InvokeClick();
|
||||
}));
|
||||
|
|
@ -320,7 +320,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
printer.Settings.QualityLayers.Add(newQuality);
|
||||
printer.Settings.ActiveQualityKey = newQuality.LayerID;
|
||||
|
||||
RebuildDropDownList();
|
||||
RebuildDropDownList(true);
|
||||
|
||||
editButton.InvokeClick();
|
||||
}
|
||||
|
|
@ -505,7 +505,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
editButton.Enabled = item.Text != defaultMenuItemText;
|
||||
}
|
||||
|
||||
private void RebuildDropDownList()
|
||||
private void RebuildDropDownList(bool updateAllSettings)
|
||||
{
|
||||
pullDownContainer.CloseChildren();
|
||||
pullDownContainer.AddChild(this.NewPulldownContainer());
|
||||
|
|
@ -513,13 +513,20 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
var sliceSettingsWidget = this.Parents<SliceSettingsWidget>().FirstOrDefault();
|
||||
if (sliceSettingsWidget != null)
|
||||
{
|
||||
sliceSettingsWidget.UpdateAllStyles();
|
||||
if (updateAllSettings)
|
||||
{
|
||||
ApplicationController.Instance.ReloadSettings(printer);
|
||||
}
|
||||
else
|
||||
{
|
||||
sliceSettingsWidget.UpdateAllStyles();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SettingsLayers_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
|
||||
{
|
||||
RebuildDropDownList();
|
||||
RebuildDropDownList(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1156,6 +1156,9 @@ Translated:Creation Data
|
|||
English:Ctrl + A = Select Alll, 'Space' = Clear Selection, 'ESC' = Cancel Drag
|
||||
Translated:Ctrl + A = Select Alll, 'Space' = Clear Selection, 'ESC' = Cancel Drag
|
||||
|
||||
English:Ctrl + P
|
||||
Translated:Ctrl + P
|
||||
|
||||
English:Ctrl + Y | Ctrl + Shift + Z
|
||||
Translated:Ctrl + Y | Ctrl + Shift + Z
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue