Salome HOME
SALOME 9.1.0 Windows version
[modules/gui.git] / src / GLViewer / GLViewer_BaseObjects.cxx
index 0a45bb38a9a07905640c1a984f86fa822abe6425..6e65422f294b93b43d9d748e7d0a80dc55018a7a 100644 (file)
@@ -1096,7 +1096,7 @@ GLboolean GLViewer_Polyline::select( GLfloat x, GLfloat y, GLfloat tol, GLViewer
     GLfloat xa, xb, ya, yb, l;
     GLfloat rsin, rcos, r, ra, rb;
     // GLboolean update;
-    GLboolean selected = myIsSel;
+    // GLboolean selected = myIsSel;
 
     myIsSel = GL_FALSE;
 
@@ -1465,8 +1465,13 @@ bool GLViewer_TextObject::translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerC
 
     HGDIOBJ old1 = SelectObject( dc, aFont );
     HGDIOBJ old2 = SelectObject( dc, aBrush );
-
-    TextOut( dc, x, y, aText.toLatin1().constData(), aText.length() );
+#ifdef UNICODE
+       LPTSTR str = new TCHAR[aText.length() + 1];
+       str[aText.toWCharArray(str)] = '\0';
+#else  
+       LPTSTR str = aText.toLatin1().constData();
+#endif
+    TextOut( dc, x, y, str, aText.length() );
 
     SelectObject ( dc, old1 );
     SelectObject ( dc, old2 );