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:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user