1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-06 14:52:34 +02:00

Make BrowserDialog code look more like EffectUIHost code

Specifically in the area of closing a window.  Added mDismissed member which can stop double dismissal.  Perhaps more relevant (?) still do an EndModal IF IsModal() is true.  These changes are in response to feedback from Paul that simply removing EndModal (which seems good on Windows) causes problems (in TimerRecord!) on Mac.
This commit is contained in:
James Crook 2016-07-01 10:07:02 +01:00
parent acde3d6152
commit 8581229c6f
2 changed files with 6 additions and 1 deletions

View File

@ -56,7 +56,11 @@ void BrowserDialog::OnBackward(wxCommandEvent & WXUNUSED(event))
void BrowserDialog::OnClose(wxCommandEvent & WXUNUSED(event))
{
//EndModal(wxID_CANCEL);
if (IsModal() && !mDismissed)
{
mDismissed = true;
EndModal(wxID_CANCEL);
}
auto parent = GetParent();
#ifdef __WXMAC__

View File

@ -52,6 +52,7 @@ public:
HtmlWindow * mpHtml;
bool mDismissed{};
DECLARE_EVENT_TABLE()
};