This commit is contained in:
2020-11-28 14:08:34 +01:00
parent 21d83f93dc
commit 90f09cc222
26 changed files with 324 additions and 477 deletions

View File

@@ -22,7 +22,8 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import com.minres.scviewer.database.BitVector;
import com.minres.scviewer.database.ISignal;
import com.minres.scviewer.database.DoubleVal;
import com.minres.scviewer.database.WaveformType;
import com.minres.scviewer.database.ui.TrackEntry;
import com.minres.scviewer.e4.application.parts.WaveformViewer;
@@ -38,9 +39,9 @@ public class WaveformPopupMenuContribution {
for(Object elem:(IStructuredSelection)sel) {
if(elem instanceof TrackEntry) {
TrackEntry e = (TrackEntry) elem;
if(e.waveform instanceof ISignal<?>) {
Object o = ((ISignal<?>) e.waveform).getEvents().firstEntry().getValue();
if(checkForDouble && o instanceof Double)
if(e.waveform.getType() == WaveformType.SIGNAL) {
Object o = e.waveform.getEvents().firstEntry().getValue()[0];
if(checkForDouble && o instanceof DoubleVal)
return true;
else if(o instanceof BitVector && ((BitVector)o).getWidth()>1)
return true;