Skip to content
Permalink
Browse files

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
homann committed Jan 1, 2007
1 parent 204cfa9 commit d792be447e701e5dc9089beacb00f1f12c830b65
@@ -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;
@@ -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))
@@ -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;
}
}

0 comments on commit d792be4

Please sign in to comment.
You can’t perform that action at this time.