From b61daf80dbb8662f056357898762314b7d8e2b2d Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 12 May 2008 23:55:45 +0000 Subject: [PATCH] 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 --- src/mac/carbon/renderer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mac/carbon/renderer.cpp b/src/mac/carbon/renderer.cpp index dc097bd198..1bae3e59b3 100644 --- a/src/mac/carbon/renderer.cpp +++ b/src/mac/carbon/renderer.cpp @@ -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 }