X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f33230391ae071f0b3c48e4d5a30be229dbf472b..21d0340384a484e3c8e04280de90c0fb8e261006:/src/propgrid/advprops.cpp diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index a634885003..4e1592ac4d 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -4,7 +4,6 @@ // Author: Jaakko Salli // Modified by: // Created: 2004-09-25 -// RCS-ID: $Id$ // Copyright: (c) Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -1287,7 +1286,7 @@ bool wxSystemColourProperty::OnEvent( wxPropertyGrid* propgrid, // switched to one that has wxButton as well. askColour = true; } - else if ( event.GetEventType() == wxEVT_COMMAND_COMBOBOX_SELECTED ) + else if ( event.GetEventType() == wxEVT_COMBOBOX ) { // Must override index detection since at this point GetIndex() // will return old value. @@ -1828,6 +1827,8 @@ wxImageFileProperty::wxImageFileProperty( const wxString& label, const wxString& m_pImage = NULL; m_pBitmap = NULL; + + LoadImageFromFile(); } wxImageFileProperty::~wxImageFileProperty() @@ -1846,6 +1847,11 @@ void wxImageFileProperty::OnSetValue() wxDELETE(m_pImage); wxDELETE(m_pBitmap); + LoadImageFromFile(); +} + +void wxImageFileProperty::LoadImageFromFile() +{ wxFileName filename = GetFileName(); // Create the image thumbnail