added wxLog::Suspend/Resume and wxYield() uses them now so that it won't flush
the messages any more git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -99,10 +99,18 @@ bool wxYield()
|
||||
wxTheApp->m_idleTag = gtk_idle_add( wxapp_idle_callback, (gpointer) NULL );
|
||||
}
|
||||
|
||||
// disable log flushing from here because a call to wxYield() shouldn't
|
||||
// normally result in message boxes popping up &c
|
||||
wxLog::Suspend();
|
||||
|
||||
/* it's necessary to call ProcessIdle() to update the frames sizes which
|
||||
might have been changed (it also will update other things set from
|
||||
OnUpdateUI() which is a nice (and desired) side effect) */
|
||||
while (wxTheApp->ProcessIdle()) { }
|
||||
while (wxTheApp->ProcessIdle())
|
||||
;
|
||||
|
||||
// let the logs be flashed again
|
||||
wxLog::Resume();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -380,9 +388,7 @@ void wxApp::OnIdle( wxIdleEvent &event )
|
||||
|
||||
/* flush the logged messages if any */
|
||||
#if wxUSE_LOG
|
||||
wxLog *log = wxLog::GetActiveTarget();
|
||||
if (log != NULL && log->HasPendingMessages())
|
||||
log->Flush();
|
||||
wxLog::FlushActive();
|
||||
#endif // wxUSE_LOG
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user