Need to allow wxMemoryDC's at any time. (It derives from wxPaint event so the 2nd half of the test catches that.)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@53583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2008-05-12 23:55:45 +00:00
parent 63830277f5
commit b61daf80db

View File

@@ -33,10 +33,12 @@
// check if we're currently in a paint event
inline bool wxInPaintEvent(wxWindow* win, wxDC& dc)
{
return
#if wxMAC_USE_CORE_GRAPHICS
return ( win->MacGetCGContextRef() != NULL );
win->MacGetCGContextRef() != NULL ||
#else
return dc.IsKindOf( CLASSINFO(wxPaintDC) );
// wxMemoryDC derives from wxPaintDC so it is okay too.
dc.IsKindOf( CLASSINFO(wxPaintDC) );
#endif
}