]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dcbase.cpp
Fix warnings about signed/unsigned comparisons inside wxMax() and friends.
[wxWidgets.git] / src / common / dcbase.cpp
index d65b47e3e6a20af617f6c6acfa9bb464b8046137..5cad40cfeed5ae89617577eb7970cf983daf6134 100644 (file)
@@ -236,6 +236,12 @@ wxMemoryDC::wxMemoryDC(wxDC *dc)
 
 void wxMemoryDC::SelectObject(wxBitmap& bmp)
 {
+    if ( bmp.IsSameAs(GetSelectedBitmap()) )
+    {
+        // Nothing to do, this bitmap is already selected.
+        return;
+    }
+
     // make sure that the given wxBitmap is not sharing its data with other
     // wxBitmap instances as its contents will be modified by any drawing
     // operation done on this DC