Dang, can't remember what I changed now

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-09-03 07:34:26 +00:00
parent bcf1fa6bb4
commit 7b46ecac64
5 changed files with 141 additions and 4 deletions

View File

@@ -84,8 +84,19 @@ void wxMemoryDC::SelectObject(const wxBitmap& bitmap)
wxFatalError("Error in wxMemoryDC::SelectObject\nBitmap is selected in another wxMemoryDC.\nDelete the first wxMemoryDC or use SelectObject(NULL)");
return;
}
m_selectedBitmap = bitmap;
// Check if the bitmap has the correct depth for this device context
if (bitmap.Ok() && (bitmap.GetDepth() != GetDepth()))
{
// Make a new bitmap that has the correct depth.
wxBitmap newBitmap = bitmap.GetBitmapForDC(* this);
m_selectedBitmap = newBitmap ;
}
else
{
m_selectedBitmap = bitmap;
}
if (!m_selectedBitmap.Ok())
return;