Edit macros window now closes on the UI thread.

This commit is contained in:
Kevin Pope 2014-02-24 10:53:08 -08:00
parent d23065a2f8
commit 3dcc5cf74b

View file

@ -335,7 +335,12 @@ namespace MatterHackers.MatterControl
addMacroButton.Click += new ButtonBase.ButtonEventHandler(addMacro_Click);
Button cancelPresetsButton = textImageButtonFactory.Generate(new LocalizedString("Close").Translated);
cancelPresetsButton.Click += (sender, e) => { this.windowController.Close(); };
cancelPresetsButton.Click += (sender, e) => {
UiThread.RunOnIdle((state) =>
{
this.windowController.Close();
});
};
FlowLayoutWidget buttonRow = new FlowLayoutWidget();
buttonRow.HAnchor = HAnchor.ParentLeftRight;