X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e9576ca53db96b462ed4c0b4bdf47d64c40203e4..07cdd027648238ac3ec1e1ad62d960698f07ed56:/src/mac/carbon/dcmemory.cpp diff --git a/src/mac/carbon/dcmemory.cpp b/src/mac/carbon/dcmemory.cpp index 7cbd330821..28a652368a 100644 --- a/src/mac/carbon/dcmemory.cpp +++ b/src/mac/carbon/dcmemory.cpp @@ -40,6 +40,18 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) m_selected = bitmap; if (m_selected.Ok()) { + wxBitmapRefData * bmap = (wxBitmapRefData*) (m_selected.GetRefData()) ; + if ( bmap->m_hBitmap ) + { + m_macPort = (GrafPtr) bmap->m_hBitmap ; + MacSetupPort() ; + m_ok = TRUE ; + // SetBackground(wxBrush(*wxWHITE, wxSOLID)); + } + else + { + m_ok = FALSE; + } } else {