]> git.saurik.com Git - wxWidgets.git/commitdiff
Possibly cured the assertion message dialog paint problem,
authorJulian Smart <julian@anthemion.co.uk>
Tue, 23 Jul 2002 16:27:14 +0000 (16:27 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 23 Jul 2002 16:27:14 +0000 (16:27 +0000)
by explicitly calling OnInternalIdle if it's a message dialog
within an assertion.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/app.cpp
src/gtk1/app.cpp

index b5045c14bb29d3d53993d86e782feddf8e17a27d..db8547b8409e05317e7123f3faa3248fa7641260 100644 (file)
@@ -24,6 +24,7 @@
 #include "wx/font.h"
 #include "wx/settings.h"
 #include "wx/dialog.h"
+#include "wx/msgdlg.h"
 
 #if wxUSE_WX_RESOURCES
     #include "wx/resource.h"
@@ -212,6 +213,13 @@ static gint wxapp_idle_callback( gpointer WXUNUSED(data) )
     // from some safely-looking functions
     if ( wxTheApp->IsInAssert() )
     {
+        // But repaint the assertion message if necessary
+        if (wxTopLevelWindows.GetCount() > 0)
+        {
+            wxWindow* win = (wxWindow*) wxTopLevelWindows.Last()->Data();
+            if (win->IsKindOf(CLASSINFO(wxGenericMessageDialog)))
+                win->OnInternalIdle();
+        }
         return TRUE;
     }
 #endif // __WXDEBUG__
index b5045c14bb29d3d53993d86e782feddf8e17a27d..db8547b8409e05317e7123f3faa3248fa7641260 100644 (file)
@@ -24,6 +24,7 @@
 #include "wx/font.h"
 #include "wx/settings.h"
 #include "wx/dialog.h"
+#include "wx/msgdlg.h"
 
 #if wxUSE_WX_RESOURCES
     #include "wx/resource.h"
@@ -212,6 +213,13 @@ static gint wxapp_idle_callback( gpointer WXUNUSED(data) )
     // from some safely-looking functions
     if ( wxTheApp->IsInAssert() )
     {
+        // But repaint the assertion message if necessary
+        if (wxTopLevelWindows.GetCount() > 0)
+        {
+            wxWindow* win = (wxWindow*) wxTopLevelWindows.Last()->Data();
+            if (win->IsKindOf(CLASSINFO(wxGenericMessageDialog)))
+                win->OnInternalIdle();
+        }
         return TRUE;
     }
 #endif // __WXDEBUG__