X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e9576ca53db96b462ed4c0b4bdf47d64c40203e4..617ec45690c340d059726a09ccfe4bab9a42d82e:/src/mac/dcmemory.cpp?ds=sidebyside diff --git a/src/mac/dcmemory.cpp b/src/mac/dcmemory.cpp index 7cbd330821..28a652368a 100644 --- a/src/mac/dcmemory.cpp +++ b/src/mac/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 {