+ // Re-attach / Re-insert photo into list if necessary\r
+ if (_point.getPhoto() != null && _photoIndex > -1)\r
+ {\r
+ // Check if photo is still in list\r
+ if (!inTrackInfo.getPhotoList().contains(_point.getPhoto()))\r
+ {\r
+ // photo has been removed - need to reinsert\r
+ inTrackInfo.getPhotoList().addPhoto(_point.getPhoto(), _photoIndex);\r
+ }\r
+ // Ensure that photo is associated with point\r
+ _point.getPhoto().setDataPoint(_point);\r
+ }\r
+ // Restore previous status of following track point if necessary\r
+ if (!_segmentStart)\r
+ {\r
+ // Deletion of point can only set following point to true, so only need to set it back to false\r
+ DataPoint nextTrackPoint = inTrackInfo.getTrack().getNextTrackPoint(_pointIndex + 1);\r
+ if (nextTrackPoint != null) {\r
+ nextTrackPoint.setSegmentStart(false);\r
+ }\r
+ }\r