copy wxImage options when copying the images (replaces patch 780705)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@22588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-08-04 17:48:35 +00:00
parent 8fcdff23a5
commit 60541ceb57
2 changed files with 7 additions and 1 deletions

View File

@@ -190,7 +190,8 @@ All:
All (GUI):
- rare crash in wxFontMapper fixed (Robert Vazan)
- Added wxMenu::FindItemByPosition.
- added wxMenu::FindItemByPosition.
- copy wxImage options when copying the images
Generic:

View File

@@ -204,6 +204,11 @@ wxImage wxImage::Copy() const
memcpy( data, GetData(), M_IMGDATA->m_width*M_IMGDATA->m_height*3 );
// also copy the image options
wxImageRefData *imgData = (wxImageRefData *)image.m_refData;
imgData->m_optionNames = M_IMGDATA->m_optionNames;
imgData->m_optionValues = M_IMGDATA->m_optionValues;
return image;
}