[QGIS Commit] r13961 - trunk/qgis/src/plugins/georeferencer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Jul 25 11:20:10 EDT 2010


Author: mmassing
Date: 2010-07-25 15:20:10 +0000 (Sun, 25 Jul 2010)
New Revision: 13961

Modified:
   trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp
Log:
Fix a bug where user was not prompted whether to save or discard modified GCPs.

Prompt-on-exit did not catch the case were only the source, but not
the destination coordinates of a GCP were modified.

Modified: trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp
===================================================================
--- trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp	2010-07-25 15:20:06 UTC (rev 13960)
+++ trunk/qgis/src/plugins/georeferencer/qgsgeorefplugingui.cpp	2010-07-25 15:20:10 UTC (rev 13961)
@@ -1857,15 +1857,15 @@
 
   int count = list1.count();
   int j = 0;
-  for ( int i = 0; i < count; ++i )
+  for ( int i = 0; i < count; ++i, ++j )
   {
     QgsGeorefDataPoint *p1 = list1.at( i );
     QgsGeorefDataPoint *p2 = list2.at( j );
-    qDebug() << "p1" << "pix" << p1->pixelCoords().toString() << "map" << p1->mapCoords().toString();
-    qDebug() << "p2" << "pix" << p2->pixelCoords().toString() << "map" << p2->mapCoords().toString();
+    if ( p1->pixelCoords() != p2->pixelCoords() )
+      return false;
+
     if ( p1->mapCoords() != p2->mapCoords() )
       return false;
-    ++j;
   }
 
   return true;



More information about the QGIS-commit mailing list