X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de6185e212ebc37ff11ff70278e3c4f68419b097..ce7208d49d5ce2ca1dc0b3b83f14f1d04f29c4bf:/src/x11/dcmemory.cpp diff --git a/src/x11/dcmemory.cpp b/src/x11/dcmemory.cpp index 810e55f83e..f5a4bddb64 100644 --- a/src/x11/dcmemory.cpp +++ b/src/x11/dcmemory.cpp @@ -16,15 +16,15 @@ #ifndef WX_PRECOMP #include "wx/utils.h" + #include "wx/settings.h" #endif -#include "wx/settings.h" - #include "wx/x11/private.h" IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxWindowDC) -wxMemoryDC::wxMemoryDC() : wxWindowDC() +wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap ) + : wxWindowDC() { m_ok = false; @@ -32,6 +32,9 @@ wxMemoryDC::wxMemoryDC() : wxWindowDC() int screen = DefaultScreen( wxGlobalDisplay() ); m_cmap = (WXColormap) DefaultColormap( wxGlobalDisplay(), screen ); + + if ( bitmap.IsOk() ) + SelectObject(bitmap); } wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )