ensure that we have event loop before showing a modal dialog; this allows to do it even before the main application loop starts
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -47,17 +47,10 @@ void wxDialog::DoShowModal()
|
|||||||
}
|
}
|
||||||
BeginAppModalStateForWindow(windowRef) ;
|
BeginAppModalStateForWindow(windowRef) ;
|
||||||
|
|
||||||
wxEventLoop * const
|
wxEventLoopGuarantor ensureHasLoop;
|
||||||
loop = static_cast<wxEventLoop *>(wxEventLoop::GetActive());
|
wxEventLoopBase * const loop = wxEventLoop::GetActive();
|
||||||
|
while ( IsModal() )
|
||||||
|
loop->Dispatch();
|
||||||
wxASSERT_MSG( loop , wxT("No Event Loop in place") );
|
|
||||||
|
|
||||||
if ( loop )
|
|
||||||
{
|
|
||||||
while ( IsModal() )
|
|
||||||
loop->Dispatch();
|
|
||||||
}
|
|
||||||
|
|
||||||
EndAppModalStateForWindow(windowRef) ;
|
EndAppModalStateForWindow(windowRef) ;
|
||||||
if ( resetGroupParent )
|
if ( resetGroupParent )
|
||||||
|
Reference in New Issue
Block a user