]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Fix of 0022463: [CEA 1044] xao import fails if the path contains some accented characters
authorakl <akl@opencascade.com>
Wed, 12 Feb 2014 13:39:34 +0000 (17:39 +0400)
committerakl <akl@opencascade.com>
Wed, 12 Feb 2014 13:39:34 +0000 (17:39 +0400)
src/EntityGUI/EntityGUI_PictureImportDlg.cxx
src/GEOMGUI/GEOM_Displayer.cxx
src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx

index 3e521dfdbdffde7f3f9536ee942e4a4acd7d1ae5..cbda0bfc0cc6c06808614ac053dbbc1c11e64827 100644 (file)
@@ -193,7 +193,8 @@ bool EntityGUI_PictureImportDlg::execute( ObjectList& objects )
   
   GEOM::GEOM_Object_var aFace = aBlocksOperations->MakeQuad4Vertices(P1,P2,P3,P4);
   getDisplayer()->SetDisplayMode(3);
-  getDisplayer()->SetTexture(theImgFileName.toStdString());
+  const QByteArray asc = theImgFileName.toUtf8();
+  getDisplayer()->SetTexture( std::string( asc.constData(), asc.length() ) );
   
   if ( !aFace->_is_nil() )
   {
index c01aa0e5c84c5394d811b2e0664494b706291f2e..58d3c3a60d5961356f8b1599a41db59bba57aa8f 100644 (file)
@@ -751,7 +751,7 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
     // Texture from properties
     QString aTexture = propMap.value( GEOM::propertyName( GEOM::Texture ) ).toString();
     if ( !aTexture.isEmpty() ) {
-       AISShape->SetTextureFileName( TCollection_AsciiString( aTexture.toStdString().c_str() ) );
+      AISShape->SetTextureFileName( TCollection_AsciiString( aTexture.toUtf8().constData() ) );
        textureAdded = true;
     }
   }
index 1a4118f7455d6a5d443a99ab8e37d9af8bc80e90..ba5d065ee4b20b976af910e03c9a2d32ba906b82 100644 (file)
@@ -254,7 +254,7 @@ bool ImportExportGUI_ImportXAODlg::execute()
     GEOM::ListOfFields_var fields;
 
     GEOM::GEOM_IInsertOperations_var ieOp = GEOM::GEOM_IInsertOperations::_narrow(getOperation());
-    res = ieOp->ImportXAO(fileName.toStdString().c_str(), shape, subShapes, groups, fields);
+    res = ieOp->ImportXAO(fileName.toUtf8().constData(), shape, subShapes, groups, fields);
 
     if (!shape->_is_nil())
     {