Made the drop list name update interactively.
This commit is contained in:
parent
b18f8fc889
commit
e4a10442c2
2 changed files with 23 additions and 10 deletions
|
|
@ -137,6 +137,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
presetNameInput.ActualTextEditWidget.EditComplete += (s, e) =>
|
||||
{
|
||||
ActiveSliceSettings.Instance.SetValue(SettingsKey.layer_name, presetNameInput.Text, presetsContext.PersistenceLayer);
|
||||
SliceSettingsWidget.SettingChanged.CallEvents(null, new StringEventArgs(SettingsKey.layer_name));
|
||||
};
|
||||
|
||||
topRow.AddChild(presetNameInput);
|
||||
|
|
@ -223,16 +224,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
Button closeButton = buttonFactory.Generate("Close".Localize());
|
||||
closeButton.Click += (sender, e) =>
|
||||
{
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
if (initialPresetName != presetsContext.PersistenceLayer.Name)
|
||||
{
|
||||
// TODO: If we get to the point where we refresh rather than reload, we need
|
||||
// to rebuild the target droplist to display the new name
|
||||
ApplicationController.Instance.ReloadAdvancedControlsPanel();
|
||||
}
|
||||
this.Close();
|
||||
});
|
||||
this.CloseOnIdle();
|
||||
};
|
||||
|
||||
container.AddChild(duplicateButton);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue