X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8552e6f031ded8ae61b4a5b489fbf06962365da7..31d7fc0f9cb3f5913ecd4a039a816487a6753a93:/contrib/src/ogl/divided.cpp diff --git a/contrib/src/ogl/divided.cpp b/contrib/src/ogl/divided.cpp index 41e62564d3..9d682b8120 100644 --- a/contrib/src/ogl/divided.cpp +++ b/contrib/src/ogl/divided.cpp @@ -81,7 +81,7 @@ void wxDividedShape::OnDrawContents(wxDC& dc) if (m_pen) dc.SetPen(* m_pen); - if (m_textColour) dc.SetTextForeground(* m_textColour); + dc.SetTextForeground(m_textColour); #ifdef __WXMSW__ // For efficiency, don't do this under X - doesn't make @@ -107,7 +107,7 @@ void wxDividedShape::OnDrawContents(wxDC& dc) { wxShapeRegion *region = (wxShapeRegion *)node->GetData(); dc.SetFont(* region->GetFont()); - dc.SetTextForeground(* region->GetActualColourObject()); + dc.SetTextForeground(region->GetActualColourObject()); double proportion = region->m_regionProportionY < 0.0 ? defaultProportion : region->m_regionProportionY; @@ -700,9 +700,8 @@ void wxDividedShapeControlPoint::OnEndDragLeft(double WXUNUSED(x), double y, int wxShapeRegion *region = (wxShapeRegion *)node->GetData(); if (region->GetText()) { - wxChar *s = copystring(region->GetText()); - dividedObject->FormatText(dc, s, i); - delete[] s; + wxString s(region->GetText()); + dividedObject->FormatText(dc, s.c_str(), i); } node = node->GetNext(); i++;