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
This commit is contained in:
Artur Wieczorek 2014-07-15 16:02:05 +00:00
parent a29e7318e6
commit 7203fd5c6b

View File

@ -1955,6 +1955,9 @@ void wxPropertyGrid::DrawItems( wxDC& dc,
else else
{ {
bufferDC = new wxMemoryDC(); 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 // If nothing was changed, then just copy from double-buffer
bufferDC->SelectObject( *m_doubleBuffer ); bufferDC->SelectObject( *m_doubleBuffer );