From dce60cda9c977d1cddfb812da2987ada18d34266 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Tue, 5 Jan 2016 09:03:01 +0100 Subject: [PATCH] =?utf8?q?precision=20des=20coordonn=C3=A9es=20globales=20?= =?utf8?q?dans=20le=20dump?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/HYDROData/HYDROData_Document.cxx | 2 +- src/HYDROData/HYDROData_Image.cxx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/HYDROData/HYDROData_Document.cxx b/src/HYDROData/HYDROData_Document.cxx index d34cc547..fd129087 100644 --- a/src/HYDROData/HYDROData_Document.cxx +++ b/src/HYDROData/HYDROData_Document.cxx @@ -253,7 +253,7 @@ bool HYDROData_Document::DumpToPython( const QString& thePyScriptPath, // Dump the local CS data to Python UpdateLCSFields(); - QString aLCS = QString( "%1.SetLocalCS( %2, %3 )" ).arg( GetDocPyName() ).arg( myLX ).arg( myLY ); + QString aLCS = QString( "%1.SetLocalCS( %2, %3 )" ).arg( GetDocPyName() ).arg( myLX, 0, 'f', 3 ).arg( myLY, 0, 'f', 3 ); if( theIsMultiFile ) aLCS.prepend( " " ); HYDROData_Tool::WriteStringsToFile( aFile, QStringList() << aLCS ); diff --git a/src/HYDROData/HYDROData_Image.cxx b/src/HYDROData/HYDROData_Image.cxx index 7a3d3602..6a3e9a3b 100644 --- a/src/HYDROData/HYDROData_Image.cxx +++ b/src/HYDROData/HYDROData_Image.cxx @@ -110,14 +110,14 @@ QStringList HYDROData_Image::DumpToPython( const QString& thePyScriptPath, aResList << QString( "%1.SetGlobalPoints( %2," ) .arg( anImageName ).arg( aTransformationMode ); aResList << QString( aGap + "QPointF( %1, %2 )," ) - .arg( aTrsfPointA.x() ).arg( aTrsfPointA.y() ); + .arg( aTrsfPointA.x(), 0, 'f', 3 ).arg( aTrsfPointA.y(), 0, 'f', 3 ); aResList << QString( aGap + "QPointF( %1, %2 )" ) - .arg( aTrsfPointB.x() ).arg( aTrsfPointB.y() ); + .arg( aTrsfPointB.x(), 0, 'f', 3 ).arg( aTrsfPointB.y(), 0, 'f', 3 ); if ( !anIsByTwoPoints ) { aResList.last().append( "," ); aResList << QString( aGap + "QPointF( %1, %2 ) )" ) - .arg( aTrsfPointC.x() ).arg( aTrsfPointC.y() ); + .arg( aTrsfPointC.x(), 0, 'f', 3 ).arg( aTrsfPointC.y(), 0, 'f', 3 ); } else { -- 2.39.2