Don't connect handler for wxEVT_TEXT_ENTER in wxComboCtrl unnecessarily
Connecting to wxEVT_TEXT_ENTER is not necessary if wxTE_PROCESS_ENTER style is
not used was always useless and is actively harmful since the changes of
5591a20093
as it results in an assert failure
now.
Just don't do it unless we really want, and will get, these events.
This commit is contained in:
@@ -1100,9 +1100,12 @@ wxComboCtrlBase::CreateTextCtrl(int style)
|
||||
m_text->Connect(id, wxEVT_TEXT,
|
||||
wxCommandEventHandler(wxComboCtrlBase::OnTextCtrlEvent),
|
||||
NULL, this);
|
||||
m_text->Connect(id, wxEVT_TEXT_ENTER,
|
||||
wxCommandEventHandler(wxComboCtrlBase::OnTextCtrlEvent),
|
||||
NULL, this);
|
||||
if ( style & wxTE_PROCESS_ENTER )
|
||||
{
|
||||
m_text->Connect(id, wxEVT_TEXT_ENTER,
|
||||
wxCommandEventHandler(wxComboCtrlBase::OnTextCtrlEvent),
|
||||
NULL, this);
|
||||
}
|
||||
|
||||
m_text->SetHint(m_hintText);
|
||||
}
|
||||
|
Reference in New Issue
Block a user