Fix release build.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
10d1f4131d
commit
3ca22d5e92
@ -128,7 +128,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject)
|
||||
|
||||
wxBitmapRefData::wxBitmapRefData()
|
||||
{
|
||||
#ifdef __WXDEBUG__
|
||||
m_selectedInto = NULL;
|
||||
#endif
|
||||
m_bitmapMask = NULL;
|
||||
m_hBitmap = (WXHBITMAP) NULL;
|
||||
m_hasAlpha = FALSE;
|
||||
@ -1043,11 +1045,15 @@ wxMask *wxBitmap::GetMask() const
|
||||
return GetBitmapData() ? GetBitmapData()->GetMask() : (wxMask *) NULL;
|
||||
}
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
|
||||
wxDC *wxBitmap::GetSelectedInto() const
|
||||
{
|
||||
return GetBitmapData() ? GetBitmapData()->m_selectedInto : (wxDC *) NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
int wxBitmap::GetQuality() const
|
||||
@ -1066,12 +1072,16 @@ bool wxBitmap::HasAlpha() const
|
||||
// wxBitmap setters
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
|
||||
void wxBitmap::SetSelectedInto(wxDC *dc)
|
||||
{
|
||||
if ( GetBitmapData() )
|
||||
GetBitmapData()->m_selectedInto = dc;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
|
||||
void wxBitmap::SetPalette(const wxPalette& palette)
|
||||
|
@ -273,10 +273,12 @@ void wxDC::SelectOldObjects(WXHDC dc)
|
||||
if (m_oldBitmap)
|
||||
{
|
||||
::SelectObject((HDC) dc, (HBITMAP) m_oldBitmap);
|
||||
#ifdef __WXDEBUG__
|
||||
if (m_selectedBitmap.Ok())
|
||||
{
|
||||
m_selectedBitmap.SetSelectedInto(NULL);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
m_oldBitmap = 0;
|
||||
if (m_oldPen)
|
||||
|
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user