make sure we always restore the passed in cg in a paint event
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -165,11 +165,12 @@ wxWindowDC::wxWindowDC(wxWindow *window)
|
||||
wxWindowDC::~wxWindowDC()
|
||||
{
|
||||
#if wxMAC_USE_CORE_GRAPHICS
|
||||
if ( m_release && m_graphicContext )
|
||||
if ( m_release )
|
||||
{
|
||||
// this must not necessarily be the current context, we must restore the state of the
|
||||
// cg we started with above (before the CGContextTranslateCTM call)
|
||||
CGContextRef cg = (CGContextRef) m_window->MacGetCGContextRef();
|
||||
CGContextRestoreGState(cg);
|
||||
//CGContextRef cg = (CGContextRef) m_graphicContext->GetNativeContext() ;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user