fixing nested modal sessions

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2014-02-17 19:13:04 +00:00
parent 95dfcdd678
commit dba39486b1

View File

@@ -418,6 +418,7 @@ void wxModalEventLoop::OSXDoRun()
{ {
BeginModalSession(m_modalWindow); BeginModalSession(m_modalWindow);
wxCFEventLoop::OSXDoRun(); wxCFEventLoop::OSXDoRun();
EndModalSession();
} }
else else
#endif #endif
@@ -427,18 +428,9 @@ void wxModalEventLoop::OSXDoRun()
} }
void wxModalEventLoop::OSXDoStop() void wxModalEventLoop::OSXDoStop()
{
#if OSX_USE_MODAL_SESSION
if ( m_modalWindow )
{
EndModalSession();
}
else
#endif
{ {
[NSApp abortModal]; [NSApp abortModal];
} }
}
// we need our own version of ProcessIdle here in order to // we need our own version of ProcessIdle here in order to
// avoid deletion of pending objects, because ProcessIdle is running // avoid deletion of pending objects, because ProcessIdle is running