From 126642174cf549e0d0b484ed75f7c417cac222ff Mon Sep 17 00:00:00 2001 From: Kevin Rosenberg Date: Sat, 1 Aug 2009 17:00:03 -0600 Subject: [PATCH] fix wxString compilation problem with non-unicode build --- libctgraphics/sgp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libctgraphics/sgp.cpp b/libctgraphics/sgp.cpp index 9757fe9..6d0e1f4 100644 --- a/libctgraphics/sgp.cpp +++ b/libctgraphics/sgp.cpp @@ -571,7 +571,8 @@ SGP::getTextExtent (const char* szText, double* worldW, double* worldH) #if HAVE_WXWINDOWS if (m_driver.isWX()) { wxCoord deviceW, deviceH; - m_driver.idWX()->GetTextExtent (wxConvCurrent->cMB2WC(szText), &deviceW, &deviceH); + wxString str (wxConvCurrent->cMB2WC(szText)); + m_driver.idWX()->GetTextExtent (str, &deviceW, &deviceH); if (m_dTextAngle == 90 || m_dTextAngle == -90) { wxCoord temp = deviceW; deviceW = deviceH; @@ -721,7 +722,8 @@ SGP::drawText (const char *pszMessage) #endif #if HAVE_WXWINDOWS if (m_driver.isWX()) { - m_driver.idWX()->DrawRotatedText (wxConvCurrent->cMB2WC(pszMessage), m_iCurrentPhysicalX, m_iCurrentPhysicalY, m_dTextAngle); + wxString str(wxConvCurrent->cMB2WC(pszMessage)); + m_driver.idWX()->DrawRotatedText (str, m_iCurrentPhysicalX, m_iCurrentPhysicalY, m_dTextAngle); } #endif } -- 2.34.1