]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dcmemory.cpp
keep selected image in sync with the normal one if it hasn't been changed (patch...
[wxWidgets.git] / src / msw / dcmemory.cpp
index 7a2de900bf59a8d8ca02ccf9d1042569aad6fdb3..ea4c0c90e60e3099b5e47431320f5a7e5796b8a2 100644 (file)
@@ -5,7 +5,7 @@
 // Modified by:
 // Created:     01/02/97
 // RCS-ID:      $Id$
-// Copyright:   (c) Julian Smart and Markus Holzem
+// Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
@@ -104,7 +104,9 @@ void wxMemoryDC::SelectObject(const wxBitmap& bitmap)
         ::SelectObject(GetHdc(), (HBITMAP) m_oldBitmap);
         if ( m_selectedBitmap.Ok() )
         {
+#ifdef __WXDEBUG__
             m_selectedBitmap.SetSelectedInto(NULL);
+#endif
             m_selectedBitmap = wxNullBitmap;
         }
     }
@@ -119,7 +121,9 @@ void wxMemoryDC::SelectObject(const wxBitmap& bitmap)
     if ( !hBmp )
         return;
 
+#ifdef __WXDEBUG__
     m_selectedBitmap.SetSelectedInto(this);
+#endif
     hBmp = (WXHBITMAP)::SelectObject(GetHdc(), (HBITMAP)hBmp);
 
     if ( !hBmp )