adapting to bitmaprefdata changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2005-02-21 13:53:22 +00:00
parent 24260aaea7
commit 796a6ef04a
2 changed files with 8 additions and 5 deletions

View File

@ -254,8 +254,8 @@ wxBitmapDataObject::wxBitmapDataObject(
Init(); Init();
if ( m_bitmap.Ok() ) if ( m_bitmap.Ok() )
{ {
m_pictHandle = wxMacCreatePicHandle( rBitmap ) ; m_pictHandle = m_bitmap.GetBitmapData()->GetPictHandle() ;
m_pictCreated = true ; m_pictCreated = false ;
} }
} }
@ -272,8 +272,8 @@ void wxBitmapDataObject::SetBitmap(
wxBitmapDataObjectBase::SetBitmap(rBitmap); wxBitmapDataObjectBase::SetBitmap(rBitmap);
if ( m_bitmap.Ok() ) if ( m_bitmap.Ok() )
{ {
m_pictHandle = wxMacCreatePicHandle( rBitmap ) ; m_pictHandle = m_bitmap.GetBitmapData()->GetPictHandle() ;
m_pictCreated = true ; m_pictCreated = false ;
} }
} }

View File

@ -192,7 +192,10 @@ void wxIcon::CopyFromBitmap(const wxBitmap& bmp)
{ {
UnRef() ; UnRef() ;
m_refData = new wxIconRefData( (WXHICON) wxMacCreateIconRef( bmp ) ) ; // as the bitmap owns that ref, we have to acquire it as well
IconRef iconRef = bmp.GetBitmapData()->GetIconRef() ;
AcquireIconRef( iconRef ) ;
m_refData = new wxIconRefData( (WXHICON) iconRef ) ;
M_ICONDATA->SetWidth( bmp.GetWidth() ) ; M_ICONDATA->SetWidth( bmp.GetWidth() ) ;
M_ICONDATA->SetHeight( bmp.GetHeight() ) ; M_ICONDATA->SetHeight( bmp.GetHeight() ) ;
} }