X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=libctgraphics%2Fsgp.cpp;h=775aba21d9a3ed0d183d86f3e2ed07c5c4b5d770;hb=dcc87ab716636e2464e104e6d79d031b2ec6b925;hp=9757fe9fb03449e911e7d0fcee351488be47540a;hpb=f7ee98f7d964ed361068179f0e7ea4475ed1abdf;p=ctsim.git diff --git a/libctgraphics/sgp.cpp b/libctgraphics/sgp.cpp index 9757fe9..775aba2 100644 --- a/libctgraphics/sgp.cpp +++ b/libctgraphics/sgp.cpp @@ -5,9 +5,7 @@ ** Programmer: Kevin Rosenberg ** ** This is part of the CTSim program -** Copyright (c) 1983-2001 Kevin Rosenberg -** -** $Id$ +** Copyright (c) 1983-2009 Kevin Rosenberg ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -571,7 +569,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 +720,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 }