Skip to content

Commit f1e975e

Browse files
author
homann
committed
Fixed localized numbers
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11352 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 3e388b5 commit f1e975e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/app/qgscustomprojectiondialog.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -926,9 +926,9 @@ void QgsCustomProjectionDialog::on_pbnCalculate_clicked()
926926
{
927927
QString tmp;
928928

929-
tmp = tmp.setNum( northing, 'f', 4 );
929+
tmp = tmp = QLocale::system().toString( northing, 'f', 4 );
930930
projectedX->setText( tmp );
931-
tmp = tmp.setNum( easthing, 'f', 4 );
931+
tmp = tmp = QLocale::system().toString( easthing, 'f', 4 );
932932
projectedY->setText( tmp );
933933
}
934934

src/app/qgsmaptoolidentify.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -351,13 +351,13 @@ void QgsMapToolIdentify::identifyVectorLayer( const QgsPoint& point )
351351
if ( f_it->geometry()->wkbType() == QGis::WKBLineString )
352352
{
353353
// Add the start and end points in as derived attributes
354-
str.setNum( f_it->geometry()->asPolyline().first().x(), 'g', 10 );
354+
str = QLocale::system().toString( f_it->geometry()->asPolyline().first().x(), 'g', 10 );
355355
mResults->addDerivedAttribute( featureNode, tr( "firstX", "attributes get sorted; translation for lastX should be lexically larger than this one" ), str );
356-
str.setNum( f_it->geometry()->asPolyline().first().y(), 'g', 10 );
356+
str = QLocale::system().toString( f_it->geometry()->asPolyline().first().y(), 'g', 10 );
357357
mResults->addDerivedAttribute( featureNode, tr( "firstY" ), str );
358-
str.setNum( f_it->geometry()->asPolyline().last().x(), 'g', 10 );
358+
str = QLocale::system().toString( f_it->geometry()->asPolyline().last().x(), 'g', 10 );
359359
mResults->addDerivedAttribute( featureNode, tr( "lastX", "attributes get sorted; translation for firstX should be lexically smaller than this one" ), str );
360-
str.setNum( f_it->geometry()->asPolyline().last().y(), 'g', 10 );
360+
str = QLocale::system().toString( f_it->geometry()->asPolyline().last().y(), 'g', 10 );
361361
mResults->addDerivedAttribute( featureNode, tr( "lastY" ), str );
362362
}
363363
}
@@ -371,9 +371,9 @@ void QgsMapToolIdentify::identifyVectorLayer( const QgsPoint& point )
371371
{
372372
// Include the x and y coordinates of the point as a derived attribute
373373
QString str;
374-
str.setNum( f_it->geometry()->asPoint().x(), 'g', 10 );
374+
str = QLocale::system().toString( f_it->geometry()->asPoint().x(), 'g', 10 );
375375
mResults->addDerivedAttribute( featureNode, "X", str );
376-
str.setNum( f_it->geometry()->asPoint().y(), 'g', 10 );
376+
str = QLocale::system().toString( f_it->geometry()->asPoint().y(), 'g', 10 );
377377
mResults->addDerivedAttribute( featureNode, "Y", str );
378378
}
379379

0 commit comments

Comments
 (0)