From 48d63da328f1c10d45a39fd08f3919e7f5ae7386 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 25 Sep 2012 23:53:14 +0000 Subject: [PATCH] Scintilla's Point class no longer matches the structure of wxPoint, so we need to copy points to a wxPoint array instead of just typcasting Scintilla's array. Fixes #14687 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/stc/stctest.cpp | 1 + src/stc/PlatWX.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/samples/stc/stctest.cpp b/samples/stc/stctest.cpp index 8db40419ef..ff590d1b12 100644 --- a/samples/stc/stctest.cpp +++ b/samples/stc/stctest.cpp @@ -330,6 +330,7 @@ AppFrame::AppFrame (const wxString &title) m_edit->SetFocus(); FileOpen (wxT("stctest.cpp")); + m_edit->SetSelection(0,0); } AppFrame::~AppFrame () { diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 0a774a063c..af67c0cdaa 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -277,7 +277,14 @@ void SurfaceImpl::LineTo(int x_, int y_) { void SurfaceImpl::Polygon(Point *pts, int npts, ColourDesired fore, ColourDesired back) { PenColour(fore); BrushColour(back); - hdc->DrawPolygon(npts, (wxPoint*)pts); + wxPoint *p = new wxPoint[npts]; + + for (int i=0; iDrawPolygon(npts, p); + delete [] p; } void SurfaceImpl::RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back) { -- 2.47.2