else
{
// point is attached, so need to confirm point deletion
+ final int pointIndex = _app.getTrackInfo().getTrack().getPointIndex(currentPhoto.getDataPoint());
undoAction = new UndoDeletePhoto(currentPhoto, _app.getTrackInfo().getSelection().getCurrentPhotoIndex(),
- currentPhoto.getDataPoint(), _app.getTrackInfo().getTrack().getPointIndex(currentPhoto.getDataPoint()));
+ currentPhoto.getDataPoint(), pointIndex);
+ undoAction.setAtBoundaryOfSelectedRange(pointIndex == _app.getTrackInfo().getSelection().getStart() ||
+ pointIndex == _app.getTrackInfo().getSelection().getEnd());
int response = JOptionPane.showConfirmDialog(_app.getFrame(),
I18nManager.getText("dialog.deletephoto.deletepoint"),
I18nManager.getText("dialog.deletephoto.title"),
}
// Add undo information to stack if necessary
if (photoDeleted) {
- _app.completeFunction(undoAction, currentPhoto.getFile().getName() + " " + I18nManager.getText("confirm.media.removed"));
+ _app.completeFunction(undoAction, currentPhoto.getName() + " " + I18nManager.getText("confirm.media.removed"));
}
}
}