From: Vadim Zeitlin Date: Thu, 26 Jul 2001 15:26:02 +0000 (+0000) Subject: avoid nested modal log dialogs X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/69c916e9212b9881f5469af321ae31431f8eb99c?ds=inline avoid nested modal log dialogs git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/logg.cpp b/src/generic/logg.cpp index e3ee75a4c0..f58a6a9719 100644 --- a/src/generic/logg.cpp +++ b/src/generic/logg.cpp @@ -249,6 +249,10 @@ void wxLogGui::Flush() size_t nMsgCount = m_aMessages.Count(); + // avoid showing other log dialogs until we're done with the dialog we're + // showing right now: nested modal dialogs make for really bad UI! + Suspend(); + wxString str; if ( nMsgCount == 1 ) { @@ -295,6 +299,9 @@ void wxLogGui::Flush() // no undisplayed messages whatsoever Clear(); } + + // allow flushing the logs again + Resume(); } // log all kinds of messages