X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b3c861501a451503b31c075ccb59d16b0ae01e99..e60022505d0e7606c114ee88b0c0f88d605cd6ad:/src/dfb/dcmemory.cpp diff --git a/src/dfb/dcmemory.cpp b/src/dfb/dcmemory.cpp index 435667e3cd..036fcb81e1 100644 --- a/src/dfb/dcmemory.cpp +++ b/src/dfb/dcmemory.cpp @@ -39,8 +39,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC) -wxMemoryDC::wxMemoryDC() +wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap ) { + if ( bitmap.IsOk() ) + SelectObject(bitmap); } wxMemoryDC::wxMemoryDC(wxDC *WXUNUSED(dc)) @@ -49,6 +51,8 @@ wxMemoryDC::wxMemoryDC(wxDC *WXUNUSED(dc)) void wxMemoryDC::SelectObject(const wxBitmap& bitmap) { + m_bmp = bitmap; + if ( !bitmap.Ok() ) { // select the bitmap out of the DC