diff --git a/docs/changes.txt b/docs/changes.txt index f748c2c364..cd188166b7 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -46,6 +46,7 @@ All (GUI): - Add wxFont::GetBaseFont() (Melroy Tellis). - Update included Scintilla to version 3.3.9 (Christian Walther). - Add wxStyledTextCtrl copy/paste text events (Christian Walther). +- Improve RTL support in wxStyledTextCtrl (Zane U. Ji). - Add support for loading old V1 BMP files to wxImage (Artur Wieczorek). - Improve auto sizing of wrapped cells in wxGrid (iwbnwif). - Fix handling of rectangular selections in wxStyledTextCtrl (roberto). diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 7c0f513520..e6b34535e7 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -211,9 +211,12 @@ void SurfaceImpl::Init(SurfaceID hdc_, WindowID) { hdc = (wxDC*)hdc_; } -void SurfaceImpl::InitPixMap(int width, int height, Surface *WXUNUSED(surface_), WindowID winid) { +void SurfaceImpl::InitPixMap(int width, int height, Surface *surface, WindowID winid) { Release(); - hdc = new wxMemoryDC(); + if (surface) + hdc = new wxMemoryDC(static_cast(surface)->hdc); + else + hdc = new wxMemoryDC(); hdcOwned = true; if (width < 1) width = 1; if (height < 1) height = 1;