X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/432efcb004c8a7f4997acab1aa044c78226c36bb..7f6b7a5a6cc86ffee3b0f751233c0594b43c7171:/src/gtk1/dcmemory.cpp?ds=sidebyside 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()) {