Skip to content

Commit

Permalink
Two errors fixed in georef plugin:
Browse files Browse the repository at this point in the history
1) Iterator/delete bug
2) Now setting sourceSRS to the same as destSRS after adding the layer into
   georef plugin window, which now disables any transformation of the raster.


git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0_8_0@6385 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Jan 2, 2007
1 parent e1af3f3 commit b65c115
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/plugins/georeferencer/qgspointdialog.cpp
Expand Up @@ -136,6 +136,12 @@ QgsPointDialog::QgsPointDialog(QString layerPath, QgisIface* theQgisInterface,
QgsMapLayerRegistry* registry = QgsMapLayerRegistry::instance();
registry->addMapLayer(layer, FALSE);


// Set source SRS same as dest SRS, so that we don't do any transformation.
// Dest SRS is set by project defaults
// The CoordinateTransform should now be shortcircuited.
layer->coordinateTransform()->setSourceSRS(layer->coordinateTransform()->destSRS());

// add layer to map canvas
std::deque<QString> layers;
layers.push_back(layer->getLayerID());
Expand Down Expand Up @@ -459,8 +465,8 @@ void QgsPointDialog::deleteDataPoint(QgsPoint& coords)
#endif
if ((x*x + y*y) < maxDistSqr)
{
mPoints.erase(it);
delete *it;
mPoints.erase(it);
mCanvas->refresh();
break;
}
Expand Down

0 comments on commit b65c115

Please sign in to comment.