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:
parent
acde3d6152
commit
8581229c6f
@ -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__
|
||||
|
@ -52,6 +52,7 @@ public:
|
||||
|
||||
|
||||
HtmlWindow * mpHtml;
|
||||
bool mDismissed{};
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user