Use the layout direction of wxTextCtrl itself, not the app, in wxMSW.

A wxTextCtrl inside an RTL window in an otherwise LTR application should still
be considered RTL, it's not clear at all why do we need to ask the application
for the layout here, so change this for consistency.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-12-05 22:18:20 +00:00
parent eb171a4592
commit 59086bd01a

View File

@ -2832,7 +2832,7 @@ bool wxTextCtrl::MSWSetParaFormat(const wxTextAttr& style, long start, long end)
#if wxUSE_RICHEDIT2
if ( m_verRichEdit > 1 )
{
if ( wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft )
if ( GetLayoutDirection() == wxLayout_RightToLeft )
{
// Use RTL paragraphs in RTL mode to get proper layout
pf.dwMask |= PFM_RTLPARA;