]> git.saurik.com Git - wxWidgets.git/commitdiff
avoid nested modal log dialogs
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 26 Jul 2001 15:26:02 +0000 (15:26 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 26 Jul 2001 15:26:02 +0000 (15:26 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/logg.cpp

index e3ee75a4c0271434af3c67907222f1091f612f45..f58a6a971931e4a11bb02fc1524d6588c8330305 100644 (file)
@@ -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