Fix crashes with readonly combobox under wxQT

This commit is contained in:
Graham Dawes
2019-02-04 09:23:08 +00:00
parent 679decd81d
commit 1472b2f8ef

View File

@@ -185,7 +185,9 @@ void wxComboBox::SetActualValue(const wxString &value)
void wxComboBox::SetValue(const wxString& value)
{
SetActualValue( value );
SetInsertionPoint( 0 );
if ( !HasFlag(wxCB_READONLY) )
SetInsertionPoint( 0 );
}
void wxComboBox::ChangeValue(const wxString &value)
@@ -249,7 +251,9 @@ void wxComboBox::Dismiss()
void wxComboBox::Clear()
{
wxTextEntry::Clear();
if ( !HasFlag(wxCB_READONLY) )
wxTextEntry::Clear();
wxItemContainer::Clear();
}