fix trace add problem when only a track is selected

This commit is contained in:
Eyck Jentzsch 2020-10-19 07:09:00 +02:00
parent 5b949a9d37
commit 54124d13bf
1 changed files with 9 additions and 0 deletions

View File

@ -1013,7 +1013,16 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
} else {
waveformPane.getStreamList().addAll(streams);
}
} else if(first instanceof TrackEntry) {
TrackEntry trackEntry = (TrackEntry) first;
if (insert) {
int index = waveformPane.getStreamList().indexOf(trackEntry);
waveformPane.getStreamList().addAll(index, streams);
} else {
waveformPane.getStreamList().addAll(streams);
}
}
}
setFocus();
}