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
This commit is contained in:
Julian Smart 2002-07-23 16:27:14 +00:00
parent fa2540e305
commit 94a6f0f8d6
2 changed files with 16 additions and 0 deletions

View File

@ -24,6 +24,7 @@
#include "wx/font.h" #include "wx/font.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/dialog.h" #include "wx/dialog.h"
#include "wx/msgdlg.h"
#if wxUSE_WX_RESOURCES #if wxUSE_WX_RESOURCES
#include "wx/resource.h" #include "wx/resource.h"
@ -212,6 +213,13 @@ static gint wxapp_idle_callback( gpointer WXUNUSED(data) )
// from some safely-looking functions // from some safely-looking functions
if ( wxTheApp->IsInAssert() ) 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; return TRUE;
} }
#endif // __WXDEBUG__ #endif // __WXDEBUG__

View File

@ -24,6 +24,7 @@
#include "wx/font.h" #include "wx/font.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/dialog.h" #include "wx/dialog.h"
#include "wx/msgdlg.h"
#if wxUSE_WX_RESOURCES #if wxUSE_WX_RESOURCES
#include "wx/resource.h" #include "wx/resource.h"
@ -212,6 +213,13 @@ static gint wxapp_idle_callback( gpointer WXUNUSED(data) )
// from some safely-looking functions // from some safely-looking functions
if ( wxTheApp->IsInAssert() ) 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; return TRUE;
} }
#endif // __WXDEBUG__ #endif // __WXDEBUG__