X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/432efcb004c8a7f4997acab1aa044c78226c36bb..94f6d685cb30a8e62d21254bbf19902b48eb2443:/src/gtk1/dcmemory.cpp diff --git a/src/gtk1/dcmemory.cpp b/src/gtk1/dcmemory.cpp index add3cc54f5..a27cce1041 100644 --- a/src/gtk1/dcmemory.cpp +++ b/src/gtk1/dcmemory.cpp @@ -21,33 +21,27 @@ IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxWindowDC) -wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap ) - : wxWindowDC() +void wxMemoryDC::Init() { m_ok = false; m_cmap = gtk_widget_get_default_colormap(); - - if ( bitmap.IsOk() ) - SelectObject(bitmap); } wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) ) : wxWindowDC() { - m_ok = false; - - m_cmap = gtk_widget_get_default_colormap(); - + Init(); } wxMemoryDC::~wxMemoryDC() { } -void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) +void wxMemoryDC::DoSelect( const wxBitmap& bitmap ) { Destroy(); + m_selected = bitmap; if (m_selected.Ok()) {