Don't always turn on wxTE_PROCESS_ENTER in wxOSX
This style was unconditionally used for all multiline controls for some reason, meaning that wxEVT_TEXT_ENTER could be received even for the controls not using wxTE_PROCESS_ENTER explicitly, which was unexpected. Don't do this any more to conform to the expected behaviour. Also do use wxTE_PROCESS_ENTER for the text control supposed to allow handling "Enter" in the text sample: surprisingly, it didn't have this style before, although it was clearly supposed to. Closes #1913.
This commit is contained in:
@@ -103,14 +103,6 @@ bool wxTextCtrl::Create( wxWindow *parent,
|
||||
if ( !wxTextCtrlBase::Create( parent, id, pos, size, style & ~(wxHSCROLL | wxVSCROLL), validator, name ) )
|
||||
return false;
|
||||
|
||||
if ( m_windowStyle & wxTE_MULTILINE )
|
||||
{
|
||||
// always turn on this style for multi-line controls
|
||||
m_windowStyle |= wxTE_PROCESS_ENTER;
|
||||
style |= wxTE_PROCESS_ENTER ;
|
||||
}
|
||||
|
||||
|
||||
SetPeer(wxWidgetImpl::CreateTextControl( this, GetParent(), GetId(), str, pos, size, style, GetExtraStyle() ));
|
||||
|
||||
MacPostControlCreate(pos, size) ;
|
||||
|
Reference in New Issue
Block a user