From 60541ceb57ca62ee168a9a131b5d5331eb4a2f0f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 4 Aug 2003 17:48:35 +0000 Subject: [PATCH] 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 --- docs/changes.txt | 3 ++- src/common/image.cpp | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index 904cb24bf9..afccb4dc70 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -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: diff --git a/src/common/image.cpp b/src/common/image.cpp index bead6bf143..edfe4b622a 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -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; }