Edit macros window now closes on the UI thread.
This commit is contained in:
parent
d23065a2f8
commit
3dcc5cf74b
1 changed files with 6 additions and 1 deletions
|
|
@ -335,7 +335,12 @@ namespace MatterHackers.MatterControl
|
||||||
addMacroButton.Click += new ButtonBase.ButtonEventHandler(addMacro_Click);
|
addMacroButton.Click += new ButtonBase.ButtonEventHandler(addMacro_Click);
|
||||||
|
|
||||||
Button cancelPresetsButton = textImageButtonFactory.Generate(new LocalizedString("Close").Translated);
|
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();
|
FlowLayoutWidget buttonRow = new FlowLayoutWidget();
|
||||||
buttonRow.HAnchor = HAnchor.ParentLeftRight;
|
buttonRow.HAnchor = HAnchor.ParentLeftRight;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue