X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/345c78ca5fa57ea6c7dc7e6a05496a8e82aa2b50..21d0340384a484e3c8e04280de90c0fb8e261006:/src/propgrid/advprops.cpp?ds=sidebyside diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index 7c26ec6d07..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. @@ -1437,7 +1436,7 @@ bool wxSystemColourProperty::StringToValue( wxVariant& value, const wxString& te { if ( !(argFlags & wxPG_EDITABLE_VALUE )) { - // This really should not occurr... + // This really should not occur... // wxASSERT(false); ResetNextIndex(); return false; @@ -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 @@ -2204,7 +2210,7 @@ wxString wxDateProperty::ValueToString( wxVariant& value, wxString wxDateProperty::DetermineDefaultDateFormat( bool showCentury ) { - // This code is basicly copied from datectlg.cpp's SetFormat + // This code is basically copied from datectlg.cpp's SetFormat // wxString format;