Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Port of r6367 into trunk, fixes ticket #478
git-svn-id: http://svn.osgeo.org/qgis/trunk@6368 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Jan 1, 2007
1 parent 204cfa9 commit d792be4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/plugins/georeferencer/qgsgeorefdatapoint.cpp
Expand Up @@ -14,7 +14,7 @@ QgsGeorefDataPoint::QgsGeorefDataPoint(QgsMapCanvas* mapCanvas, int id,

void QgsGeorefDataPoint::drawShape(QPainter & p)
{
QString msg = QString("X %1\nY %2").arg(int(mMapCoords.x())).arg(int(mMapCoords.y()));
QString msg = QString("X %1\nY %2").arg(QString::number(mMapCoords.x(),'f')).arg(QString::number(mMapCoords.y(),'f'));
QPoint pnt = toCanvasCoords(mPixelCoords);
int x = pnt.x(), y = pnt.y();
QFont font;
Expand Down
7 changes: 4 additions & 3 deletions src/plugins/georeferencer/qgspointdialog.cpp
Expand Up @@ -375,8 +375,8 @@ bool QgsPointDialog::generateWorldFile()
<<0<<endl
<<0<<endl
<<-pixelSize<<endl
<<(origin.x() - xOffset * pixelSize)<<endl
<<(origin.y() + yOffset * pixelSize)<<endl;
<<QString::number(origin.x() - xOffset * pixelSize, 'f')<<endl
<<QString::number(origin.y() + yOffset * pixelSize, 'f')<<endl;
// write the data points in case we need them later
QFile pointFile(mLayer->source() + ".points");
if (pointFile.open(QIODevice::WriteOnly))
Expand All @@ -386,7 +386,8 @@ bool QgsPointDialog::generateWorldFile()
for (unsigned int i = 0; i < mapCoords.size(); ++i)
{
points<<(QString("%1\t%2\t%3\t%4").
arg(mapCoords[i].x()).arg(mapCoords[i].y()).
arg(QString::number(mapCoords[i].x(), 'f')).
arg(QString::number(mapCoords[i].y(), 'f')).
arg(pixelCoords[i].x()).arg(pixelCoords[i].y()))<<endl;
}
}
Expand Down

0 comments on commit d792be4

Please sign in to comment.