if ( GEOMBase::GetShape( anObj, aShape ) && !aShape.IsNull() &&
aShape.ShapeType() == TopAbs_VERTEX ) {
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
- myX->setText( QString( "%1" ).arg( aPnt.X() ) );
- myY->setText( QString( "%1" ).arg( aPnt.Y() ) );
- myZ->setText( QString( "%1" ).arg( aPnt.Z() ) );
+ myX->setText( DlgRef::PrintDoubleValue( aPnt.X() ) );
+ myY->setText( DlgRef::PrintDoubleValue( aPnt.Y() ) );
+ myZ->setText( DlgRef::PrintDoubleValue( aPnt.Z() ) );
}
else {
myX->setText( "" );
if ( qAbs(theValue) < prec )
return "0";
- QString aRes;
- aRes.setNum( theValue, 'g', thePrecision );
+ QString aRes = QLocale().toString( theValue, 'g', qAbs( thePrecision ) );
if ( prec > 0 ) {
int p = 0;
while ( p < thePrecision ) {
- aRes.setNum( theValue, 'g', p++ );
+ QString aRes = QLocale().toString( theValue, 'g', qAbs( p++ ) );
double v = aRes.toDouble();
double err = qAbs( theValue - v );
if ( err > 0 && err <= prec )
}
// remove trailing zeroes
- QString delim( "." );
+ QString delim( QLocale().decimalPoint() );
int idx = aRes.lastIndexOf( delim );
if ( idx == -1 )