]> git.saurik.com Git - wxWidgets.git/commitdiff
Corrected m_depth assignment in CopyFromIcon
authorDavid Elliott <dfe@tgwbd.org>
Tue, 11 Jan 2005 15:07:02 +0000 (15:07 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Tue, 11 Jan 2005 15:07:02 +0000 (15:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/cocoa/bitmap.mm

index adcf08c262ddbf8219b6a8f29b4214ba0bc4f896..4d5a1b05ccc94b0c8dc961365bfca49a09e49b28 100644 (file)
@@ -371,7 +371,7 @@ bool wxBitmap::CopyFromIcon(const wxIcon& icon)
     M_BITMAPDATA->m_cocoaNSBitmapImageRep = newBitmapRep;
     M_BITMAPDATA->m_width = [newBitmapRep pixelsWide];
     M_BITMAPDATA->m_height = [newBitmapRep pixelsHigh];
-    M_BITMAPDATA->m_depth = [newBitmapRep bitsPerSample];
+    M_BITMAPDATA->m_depth = [newBitmapRep bitsPerSample]*[newBitmapRep samplesPerPixel];
     M_BITMAPDATA->m_ok = true;
     M_BITMAPDATA->m_numColors = 0;
     M_BITMAPDATA->m_quality = 0;