From 262ed2c1335e481ca72646246ccdef81f3825d9e Mon Sep 17 00:00:00 2001 From: Tim Kosse Date: Sat, 18 Jul 2015 02:24:39 +0200 Subject: [PATCH] Don't allow rich text content in non-rich wxTextCtrl in wxOSX. Explicitly disable rich text content and automatic quotation marks replacement in normal multiline text controls to make them behave closer to single line ones and also multiline ones on other platforms. See #16805. --- src/osx/cocoa/textctrl.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/osx/cocoa/textctrl.mm b/src/osx/cocoa/textctrl.mm index e4c6567bb9..3602eea161 100644 --- a/src/osx/cocoa/textctrl.mm +++ b/src/osx/cocoa/textctrl.mm @@ -580,6 +580,12 @@ wxNSTextViewControl::wxNSTextViewControl( wxTextCtrl *wxPeer, WXWidget w ) [tv setHorizontallyResizable:NO]; [tv setAutoresizingMask:NSViewWidthSizable]; + if ( !wxPeer->HasFlag(wxTE_RICH | wxTE_RICH2) ) + { + [tv setRichText:NO]; + [tv setAutomaticQuoteSubstitutionEnabled:NO]; + } + [m_scrollView setDocumentView: tv]; [tv setDelegate: tv];