]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed stupid big when assigning wxImage's palette to wxBitmap
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 11 Nov 2001 19:00:25 +0000 (19:00 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 11 Nov 2001 19:00:25 +0000 (19:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mgl/bitmap.cpp

index ca87f8483b61167d6cf3ba632c441357b80c45a8..0520051d37d233516b80ca4fa5f3fc21ee890066 100644 (file)
@@ -307,7 +307,7 @@ wxBitmap::wxBitmap(const wxImage& image, int depth = -1)
 
     MGLDevCtx *bdc = CreateTmpDC();
 
-    if ( depth <= 8 && image.HasPalette() )
+    if ( GetDepth() <= 8 && image.HasPalette() )
         SetPalette(image.GetPalette());
 
     bdc->bitBlt(idc, 0, 0, width, height, 0, 0, MGL_REPLACE_MODE);