From 7203fd5c6b1613156cf4e70d982866bcfc719cd8 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Tue, 15 Jul 2014 16:02:05 +0000 Subject: [PATCH] When drawing wxPG items (with double buffering) use the same layout direction as the window uses. Memory DC used for double buffering purposes should inherit layout direction from the window DC to ensure that texts are rendered correctly. Closes #15797. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/propgrid/propgrid.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 2dc4688772..de22c22662 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -1955,6 +1955,9 @@ void wxPropertyGrid::DrawItems( wxDC& dc, else { bufferDC = new wxMemoryDC(); + // Use the same layout direction as the window DC uses + // to ensure that the text is rendered correctly. + bufferDC->SetLayoutDirection(dc.GetLayoutDirection()); // If nothing was changed, then just copy from double-buffer bufferDC->SelectObject( *m_doubleBuffer );