Reset wxDialog::m_modality sooner in wxOSX.
Change the internal flag to wxDIALOG_MODALITY_NONE before sending wxEVT_WINDOW_MODAL_DIALOG_CLOSED event. This ensures that if the dialog is shown again from this event handler it works correctly. Closes #13951. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -115,7 +115,12 @@ bool wxDialog::Show(bool show)
|
|||||||
|
|
||||||
if ( !show )
|
if ( !show )
|
||||||
{
|
{
|
||||||
switch( m_modality )
|
const int modalityOrig = m_modality;
|
||||||
|
|
||||||
|
// complete the 'hiding' before we send the event
|
||||||
|
m_modality = wxDIALOG_MODALITY_NONE;
|
||||||
|
|
||||||
|
switch ( modalityOrig )
|
||||||
{
|
{
|
||||||
case wxDIALOG_MODALITY_WINDOW_MODAL:
|
case wxDIALOG_MODALITY_WINDOW_MODAL:
|
||||||
EndWindowModal(); // OS X implementation method for cleanup
|
EndWindowModal(); // OS X implementation method for cleanup
|
||||||
@@ -124,7 +129,6 @@ bool wxDialog::Show(bool show)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
m_modality = wxDIALOG_MODALITY_NONE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user