Fixes #3956. MessageBox doesn't return the index of IsDefault button (#3958)

* Fixes #3956. MessageBox doesn't return the index of IsDefault button

* Change to Theory test.

* Fix unit test 'Error opening terminal: unknown.'

* Remove RunningUnitTests = true because constructor already set it.

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
This commit is contained in:
BDisp
2025-03-06 21:06:51 +00:00
committed by GitHub
parent 7162ed850c
commit 85cf6619ed
2 changed files with 25 additions and 1 deletions

View File

@@ -374,6 +374,10 @@ public static class MessageBox
{
Clicked = (int)btn.Data!;
}
else
{
Clicked = defaultButton;
}
e.Cancel = true;
Application.RequestStop ();