From 59086bd01a035c8c3a912270951981c80dc83805 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 5 Dec 2014 22:18:20 +0000 Subject: [PATCH] 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 --- src/msw/textctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index e8a4e588dd..263ff1a0b3 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -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;