if (currentAudio != null)
{
// Audio is selected, see if it has a point or not
if (currentAudio != null)
{
// Audio is selected, see if it has a point or not
undoAction = new UndoDeleteAudio(currentAudio, _app.getTrackInfo().getSelection().getCurrentAudioIndex(),
undoAction = new UndoDeleteAudio(currentAudio, _app.getTrackInfo().getSelection().getCurrentAudioIndex(),
- currentAudio.getDataPoint(), _app.getTrackInfo().getTrack().getPointIndex(currentAudio.getDataPoint()));
+ currentAudio.getDataPoint(), pointIndex);
+ undoAction.setAtBoundaryOfSelectedRange(pointIndex == _app.getTrackInfo().getSelection().getStart() ||
+ pointIndex == _app.getTrackInfo().getSelection().getEnd());
int response = JOptionPane.showConfirmDialog(_app.getFrame(),
I18nManager.getText("dialog.deleteaudio.deletepoint"),
I18nManager.getText(getNameKey()), JOptionPane.YES_NO_CANCEL_OPTION);
int response = JOptionPane.showConfirmDialog(_app.getFrame(),
I18nManager.getText("dialog.deleteaudio.deletepoint"),
I18nManager.getText(getNameKey()), JOptionPane.YES_NO_CANCEL_OPTION);