The combobox didn't like empty strings at all. It
caused the pop-up-list to get skrewed up. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
72763bfed4
commit
22a70443db
@ -60,8 +60,9 @@ protected:
|
||||
void OnTextChange( wxCommandEvent& event )
|
||||
{
|
||||
wxString s = GetValue();
|
||||
|
||||
m_cb->DelegateTextChanged( s );
|
||||
|
||||
if (!s.IsEmpty())
|
||||
m_cb->DelegateTextChanged( s );
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
@ -366,7 +367,11 @@ void wxComboBox::SetSelection(long from, long to)
|
||||
|
||||
void wxComboBox::Append(const wxString& item)
|
||||
{
|
||||
m_choice->DoAppend( item );
|
||||
// I am not sure what other ports do,
|
||||
// but wxMac chokes on empty entries.
|
||||
|
||||
if (!item.IsEmpty())
|
||||
m_choice->DoAppend( item );
|
||||
}
|
||||
|
||||
void wxComboBox::Delete(int n)
|
||||
|
@ -60,8 +60,9 @@ protected:
|
||||
void OnTextChange( wxCommandEvent& event )
|
||||
{
|
||||
wxString s = GetValue();
|
||||
|
||||
m_cb->DelegateTextChanged( s );
|
||||
|
||||
if (!s.IsEmpty())
|
||||
m_cb->DelegateTextChanged( s );
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
@ -366,7 +367,11 @@ void wxComboBox::SetSelection(long from, long to)
|
||||
|
||||
void wxComboBox::Append(const wxString& item)
|
||||
{
|
||||
m_choice->DoAppend( item );
|
||||
// I am not sure what other ports do,
|
||||
// but wxMac chokes on empty entries.
|
||||
|
||||
if (!item.IsEmpty())
|
||||
m_choice->DoAppend( item );
|
||||
}
|
||||
|
||||
void wxComboBox::Delete(int n)
|
||||
|
Loading…
Reference in New Issue
Block a user