From 36aac19594c6739835801b7ecbb1906c0162a02a Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 16 Feb 2002 11:37:50 +0000 Subject: [PATCH] previous change to wxImage was wrong, it didn't account for saving same image twice git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/image.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/common/image.cpp b/src/common/image.cpp index f533e00432..2c5ba9758d 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -274,6 +274,7 @@ wxImage wxImage::Scale( int width, int height ) const } } #endif + // In case this is a cursor, make sure the hotspot is scalled accordingly: if ( HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_X) ) image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, @@ -940,8 +941,7 @@ bool wxImage::LoadFile( const wxString& filename, const wxString& mimetype, int bool wxImage::SaveFile( const wxString& filename, int type ) const { #if wxUSE_STREAMS - if ( !HasOption(wxIMAGE_OPTION_FILENAME) ) - ((wxImage*)this)->SetOption(wxIMAGE_OPTION_FILENAME, filename); + ((wxImage*)this)->SetOption(wxIMAGE_OPTION_FILENAME, filename); wxFileOutputStream stream(filename); @@ -958,8 +958,7 @@ bool wxImage::SaveFile( const wxString& filename, int type ) const bool wxImage::SaveFile( const wxString& filename, const wxString& mimetype ) const { #if wxUSE_STREAMS - if ( !HasOption(wxIMAGE_OPTION_FILENAME) ) - ((wxImage*)this)->SetOption(wxIMAGE_OPTION_FILENAME, filename); + ((wxImage*)this)->SetOption(wxIMAGE_OPTION_FILENAME, filename); wxFileOutputStream stream(filename); -- 2.45.2