From 94a6f0f8d654d41867e85447432db5b88c1fd445 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 23 Jul 2002 16:27:14 +0000 Subject: [PATCH] Possibly cured the assertion message dialog paint problem, 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 | 8 ++++++++ src/gtk1/app.cpp | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index b5045c14bb..db8547b840 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -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__ diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index b5045c14bb..db8547b840 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/app.cpp @@ -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__ -- 2.45.2