]> git.saurik.com Git - wxWidgets.git/blobdiff - src/dfb/dcmemory.cpp
avoiding nesting dcs on the same window concurrently
[wxWidgets.git] / src / dfb / dcmemory.cpp
index 435667e3cd9794bf7ea4ef89b4cffd5a6254351e..036fcb81e108287e965a9c9f3fcdf4877386c071 100644 (file)
 
 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