Fix of 0022463: [CEA 1044] xao import fails if the path contains some accented characters

This commit is contained in:
akl 2014-02-12 17:39:34 +04:00
parent 53c951cf82
commit c66c69abfd
3 changed files with 4 additions and 3 deletions

View 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() )
{

View 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;
}
}

View 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())
{