remove old wxMac workaround
[ctsim.git] / libctgraphics / sgp.cpp
index 305a6300f4aed6cb72b5430979910b630bc8d6b3..6d0e1f4838daa28d34894ecd2c76a0ddafc15cd8 100644 (file)
@@ -570,9 +570,9 @@ SGP::getTextExtent (const char* szText, double* worldW, double* worldH)
 {
 #if HAVE_WXWINDOWS
   if (m_driver.isWX()) {
-    wxString sText (szText);
     wxCoord deviceW, deviceH;
-    m_driver.idWX()->GetTextExtent (sText, &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;
@@ -722,7 +722,7 @@ SGP::drawText (const char *pszMessage)
 #endif
 #if HAVE_WXWINDOWS
   if (m_driver.isWX()) {
-    wxString str (pszMessage);
+    wxString str(wxConvCurrent->cMB2WC(pszMessage));
     m_driver.idWX()->DrawRotatedText (str, m_iCurrentPhysicalX, m_iCurrentPhysicalY, m_dTextAngle);
   }
 #endif