From 54124d13bfd9bab3370735a8e9c0c11c5dee4f95 Mon Sep 17 00:00:00 2001 From: eyck Date: Mon, 19 Oct 2020 07:09:00 +0200 Subject: [PATCH] fix trace add problem when only a track is selected --- .../scviewer/e4/application/parts/WaveformViewer.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java index 96e65cc..f11917f 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java @@ -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(); }