fix reload issues
This commit is contained in:
parent
788065e456
commit
f57fb93525
|
@ -62,9 +62,4 @@ public interface IWaveformDb extends IHierNode {
|
||||||
*/
|
*/
|
||||||
public boolean isLoaded();
|
public boolean isLoaded();
|
||||||
|
|
||||||
/**
|
|
||||||
* Clear.
|
|
||||||
*/
|
|
||||||
public void clear();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,16 +165,6 @@ public class WaveformDb extends HierNode implements IWaveformDb, PropertyChangeL
|
||||||
return ext;
|
return ext;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Clear.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void clear() {
|
|
||||||
waveforms.clear();
|
|
||||||
childNodes.clear();
|
|
||||||
loaded = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if is loaded.
|
* Checks if is loaded.
|
||||||
*
|
*
|
||||||
|
|
|
@ -613,7 +613,12 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
Map<String, String> state = new HashMap<>();
|
Map<String, String> state = new HashMap<>();
|
||||||
saveWaveformViewerState(state);
|
saveWaveformViewerState(state);
|
||||||
waveformPane.getStreamList().clear();
|
waveformPane.getStreamList().clear();
|
||||||
database.clear();
|
database = dbFactory.getDatabase();
|
||||||
|
database.addPropertyChangeListener(evt -> {
|
||||||
|
if (IHierNode.WAVEFORMS.equals(evt.getPropertyName())) { //$NON-NLS-1$
|
||||||
|
myParent.getDisplay().syncExec(() -> waveformPane.setMaxTime(database.getMaxTime()));
|
||||||
|
}
|
||||||
|
});
|
||||||
if (!filesToLoad.isEmpty())
|
if (!filesToLoad.isEmpty())
|
||||||
loadDatabase(state, 0L);
|
loadDatabase(state, 0L);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue