diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index 12d3ae3b8d..accb63bcd1 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -1458,17 +1458,14 @@ bool wxSystemColourProperty::StringToValue( wxVariant& value, const wxString& te return false; } - if ( (argFlags & wxPG_PROPERTY_SPECIFIC) ) - { - // Query for value from the event handler. - // User will be asked for custom color later on in OnEvent(). - ResetNextIndex(); - return false; - } if ( !QueryColourFromUser(value) ) { ResetNextIndex(); - return false; + if ( !(argFlags & wxPG_PROPERTY_SPECIFIC) ) + return false; + // If query for value comes from the event handler + // use current pending value to be processed later on in OnEvent(). + SetValueInEvent(value); } } else diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index b92ad8d638..ba7e2972aa 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -1228,11 +1228,11 @@ WX_PG_IMPLEMENT_INTERNAL_EDITOR_CLASS(ComboBox, void wxPGComboBoxEditor::UpdateControl( wxPGProperty* property, wxWindow* ctrl ) const { wxOwnerDrawnComboBox* cb = (wxOwnerDrawnComboBox*)ctrl; + const int index = property->GetChoiceSelection(); wxString s = property->GetValueAsString(wxPG_EDITABLE_VALUE); + cb->SetSelection(index); property->GetGrid()->SetupTextCtrlValue(s); cb->SetValue(s); - - // TODO: If string matches any selection, then select that. }