s_openDialogs--;
}
-
-IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxTopLevelWindow)
-
void wxDialog::Init()
{
m_modality = wxDIALOG_MODALITY_NONE;
// about it
bool wxDialog::IsEscapeKey(const wxKeyEvent& event)
{
- if ( event.GetKeyCode() == '.' && event.GetModifiers() == wxMOD_CMD )
+ if ( event.GetKeyCode() == '.' && event.GetModifiers() == wxMOD_CONTROL )
return true;
return wxDialogBase::IsEscapeKey(event);
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:
EndWindowModal(); // OS X implementation method for cleanup
default:
break;
}
- m_modality = wxDIALOG_MODALITY_NONE;
}
return true;