Merge branch 'hotfix/#29_cannot_delete_signals' into develop
This commit is contained in:
commit
d77aaa3865
|
@ -193,7 +193,7 @@ public class TxStream extends HierNode implements ITxStream<ITxEvent> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean equals(IWaveform other) {
|
public Boolean equals(IWaveform other) {
|
||||||
return(other instanceof TxStream && this.getId()==other.getId());
|
return(other instanceof TxStream && this.getId().equals(other.getId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,7 @@ public class VCDSignal<T> extends HierNode implements ISignal<T> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean equals(IWaveform other) {
|
public Boolean equals(IWaveform other) {
|
||||||
return(other instanceof VCDSignal<?> && this.getId()==other.getId());
|
return( other instanceof VCDSignal<?> && this.getId().equals(other.getId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -140,7 +140,7 @@ public class WaveformDb extends HierNode implements IWaveformDb {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(name == hier[hier.length-1]){ //leaf
|
if(name.equals(hier[hier.length-1])){ //leaf
|
||||||
if(n1!=null) {
|
if(n1!=null) {
|
||||||
if(n1 instanceof HierNode){
|
if(n1 instanceof HierNode){
|
||||||
node.getChildNodes().remove(n1);
|
node.getChildNodes().remove(n1);
|
||||||
|
|
|
@ -669,12 +669,9 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
* @param persistedState the persisted state
|
* @param persistedState the persisted state
|
||||||
*/
|
*/
|
||||||
protected void saveWaveformViewerState(Map<String, String> persistedState) {
|
protected void saveWaveformViewerState(Map<String, String> persistedState) {
|
||||||
Integer index;
|
|
||||||
boolean isStream = false;
|
|
||||||
persistedState.put(SHOWN_WAVEFORM + "S", Integer.toString(waveformPane.getStreamList().size())); //$NON-NLS-1$
|
persistedState.put(SHOWN_WAVEFORM + "S", Integer.toString(waveformPane.getStreamList().size())); //$NON-NLS-1$
|
||||||
index = 0;
|
Integer index = 0;
|
||||||
for (TrackEntry trackEntry : waveformPane.getStreamList()) {
|
for (TrackEntry trackEntry : waveformPane.getStreamList()) {
|
||||||
if(trackEntry.isStream()) { isStream=true; }
|
|
||||||
persistedState.put(SHOWN_WAVEFORM + index, trackEntry.waveform.getFullName());
|
persistedState.put(SHOWN_WAVEFORM + index, trackEntry.waveform.getFullName());
|
||||||
persistedState.put(SHOWN_WAVEFORM + index + VALUE_DISPLAY, trackEntry.valueDisplay.toString());
|
persistedState.put(SHOWN_WAVEFORM + index + VALUE_DISPLAY, trackEntry.valueDisplay.toString());
|
||||||
persistedState.put(SHOWN_WAVEFORM + index + WAVE_DISPLAY, trackEntry.waveDisplay.toString());
|
persistedState.put(SHOWN_WAVEFORM + index + WAVE_DISPLAY, trackEntry.waveDisplay.toString());
|
||||||
|
@ -693,8 +690,9 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
|
|
||||||
// get selected transaction of a stream
|
// get selected transaction of a stream
|
||||||
ISelection selection = waveformPane.getSelection();
|
ISelection selection = waveformPane.getSelection();
|
||||||
if (!selection.isEmpty() && isStream) {
|
if (!selection.isEmpty()) {
|
||||||
List<Object> t = getISelection(selection);
|
List<Object> t = getISelection(selection);
|
||||||
|
if(t.get(0) instanceof ITx) {
|
||||||
ITx tx = (ITx) t.get(0);
|
ITx tx = (ITx) t.get(0);
|
||||||
TrackEntry te = (TrackEntry) t.get(1);
|
TrackEntry te = (TrackEntry) t.get(1);
|
||||||
// get transaction id
|
// get transaction id
|
||||||
|
@ -704,12 +702,12 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
persistedState.put(SELECTED_TRACKENTRY_NAME, name);
|
persistedState.put(SELECTED_TRACKENTRY_NAME, name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected List<Object> getISelection(ISelection selection){
|
protected List<Object> getISelection(ISelection selection){
|
||||||
List<Object> result = new LinkedList<Object> ();
|
List<Object> result = new LinkedList<Object> ();
|
||||||
|
|
||||||
if ( selection instanceof IStructuredSelection )
|
if ( selection instanceof IStructuredSelection ) {
|
||||||
{
|
|
||||||
Iterator<?> i = ((IStructuredSelection)selection).iterator();
|
Iterator<?> i = ((IStructuredSelection)selection).iterator();
|
||||||
while (i.hasNext()){
|
while (i.hasNext()){
|
||||||
Object o = i.next ();
|
Object o = i.next ();
|
||||||
|
|
Loading…
Reference in New Issue