Run callbacks before close (fixes print recovery test)

This commit is contained in:
LarsBrubaker 2020-03-25 15:29:48 -07:00
parent a0fad3f693
commit 8d53ba15bd

View file

@ -113,11 +113,11 @@ namespace MatterHackers.MatterControl
var affirmativeButton = theme.CreateDialogButton(yesOk);
affirmativeButton.Click += (s, e) =>
{
this.DialogWindow.Close();
// If applicable, invoke the callback
responseCallback?.Invoke(true);
haveResponded = true;
this.DialogWindow.Close();
};
this.AddPageAction(affirmativeButton, messageType != MessageType.YES_NO_WITHOUT_HIGHLIGHT);