*/\r
public String getDescription()\r
{\r
- return I18nManager.getText("undo.correlate") + " (" + _numPhotosCorrelated + ")";\r
+ return I18nManager.getText("undo.correlatephotos") + " (" + _numPhotosCorrelated + ")";\r
}\r
\r
\r
for (int i=0; i<_photoPoints.length; i++)\r
{\r
Photo photo = inTrackInfo.getPhotoList().getPhoto(i);\r
- // Only need to look at connected photos, if they're still tagged then leave them\r
+ // Only need to look at connected photos, since correlation wouldn't disconnect\r
if (photo.getCurrentStatus() == Photo.Status.CONNECTED)\r
{\r
- DataPoint point = _photoPoints[i];\r
- photo.setDataPoint(point);\r
- if (point != null) {\r
- point.setPhoto(photo);\r
+ DataPoint prevPoint = _photoPoints[i];\r
+ DataPoint currPoint = photo.getDataPoint();\r
+ photo.setDataPoint(prevPoint);\r
+ if (currPoint != null) {\r
+ currPoint.setPhoto(null); // disconnect\r
+ }\r
+ if (prevPoint != null) {\r
+ prevPoint.setPhoto(photo); // reconnect to prev point\r
}\r
}\r
}\r
// clear selection\r
inTrackInfo.getSelection().clearAll();\r
}\r
-}
\ No newline at end of file
+}\r