From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Thu, 20 Dec 2007 01:19:15 +0000 (+0000)
Subject: set up the correct layout direction for memory dc in Render() (patch 1789359)
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ef329166292a66f2f7b3c43d8a02da818321bd4d?ds=sidebyside

set up the correct layout direction for memory dc in Render() (patch 1789359)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp
index 048229f35f..fe3b52e7b2 100644
--- a/src/aui/auibook.cpp
+++ b/src/aui/auibook.cpp
@@ -1611,6 +1611,11 @@ void wxAuiTabContainer::Render(wxDC* raw_dc, wxWindow* wnd)
         return;
 
     wxMemoryDC dc;
+
+    // use the same layout direction as the window DC uses to ensure that the
+    // text is rendered correctly
+    dc.SetLayoutDirection(raw_dc->GetLayoutDirection());
+
     wxBitmap bmp;
     size_t i;
     size_t page_count = m_pages.GetCount();