package tim.prune.undo;\r
\r
import tim.prune.I18nManager;\r
+import tim.prune.data.DataPoint;\r
+import tim.prune.data.Photo;\r
import tim.prune.data.TrackInfo;\r
\r
/**\r
cropIndex = inTrackInfo.getTrack().getNumPoints() - _numPoints;\r
inTrackInfo.getTrack().cropTo(cropIndex);\r
}\r
+ else\r
+ {\r
+ // Loop through the points (if any) and detach them\r
+ for (int i=0; i<_numPhotos; i++)\r
+ {\r
+ Photo photo = inTrackInfo.getPhotoList().getPhoto(inTrackInfo.getPhotoList().getNumPhotos() - 1 - i);\r
+ if (photo.isConnected()) {\r
+ DataPoint point = photo.getDataPoint();\r
+ if (point != null) {point.setPhoto(null);}\r
+ }\r
+ }\r
+ }\r
// crop photo list to previous size\r
cropIndex = inTrackInfo.getPhotoList().getNumPhotos() - _numPhotos;\r
inTrackInfo.getPhotoList().cropTo(cropIndex);\r