diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 3a3537cd..9141e4f6 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -22,5 +22,5 @@ org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=21 diff --git a/src/PamView/dialog/SourcePanel.java b/src/PamView/dialog/SourcePanel.java index cc57419c..7b6087db 100644 --- a/src/PamView/dialog/SourcePanel.java +++ b/src/PamView/dialog/SourcePanel.java @@ -234,6 +234,9 @@ public class SourcePanel implements ActionListener{ if (channelBoxes == null) return; int channels = 0; PamDataBlock sb = getSource(); + if (sb == null) { + return; + } String chanOrSeqString = "Channel "; channelListHeader.setText("Channel list ..."); @@ -491,7 +494,11 @@ public class SourcePanel implements ActionListener{ * @param channelList bitmap of currently selected channels */ public void setChannelList(int channelList) { - var availableChannels = getSource().getSequenceMap(); + PamDataBlock source = getSource(); + if (source == null) { + return; + } + var availableChannels = source.getSequenceMap(); var toSelect = channelList & availableChannels; if (toSelect != channelList) { diff --git a/src/pamScrollSystem/LoadOptionsDialog.java b/src/pamScrollSystem/LoadOptionsDialog.java index e89b13e1..67410ee6 100644 --- a/src/pamScrollSystem/LoadOptionsDialog.java +++ b/src/pamScrollSystem/LoadOptionsDialog.java @@ -46,7 +46,7 @@ public class LoadOptionsDialog extends PamDialog { private AbstractScrollManager scrollManager; private long[] standardLoadTimes = {1000, 2000, 5000, 10000, 30000, 60*1000, 2*60*1000, - 5*60*1000, 10*60*1000, 15*60*1000, 30*60*1000, 3600*1000, 3600*2*1000, 3600*6*1000, + 5*60*1000, 10*60*1000, 15*60*1000, 20*60*1000, 30*60*1000, 3600*1000, 3600*2*1000, 3600*6*1000, 3600*12*1000, 3600*24*1000, 2*3600*24*1000, 7*3600*24*1000, 14L*3600L*24L*1000L, 30L*3600L*24L*1000L, 60L*3600L*24L*1000L, 365L*3600L*24L*1000L}; diff --git a/src/pamScrollSystem/PamScrollerData.java b/src/pamScrollSystem/PamScrollerData.java index 11cc7265..5d5453d9 100644 --- a/src/pamScrollSystem/PamScrollerData.java +++ b/src/pamScrollSystem/PamScrollerData.java @@ -12,6 +12,11 @@ public class PamScrollerData implements Serializable, Cloneable { */ protected String name; + public PamScrollerData() { + super(); + // TODO Auto-generated constructor stub + } + /** * @return the name */ diff --git a/src/pamScrollSystem/ViewerScrollerManager.java b/src/pamScrollSystem/ViewerScrollerManager.java index 7a633ea0..64fddd62 100644 --- a/src/pamScrollSystem/ViewerScrollerManager.java +++ b/src/pamScrollSystem/ViewerScrollerManager.java @@ -32,7 +32,7 @@ public class ViewerScrollerManager extends AbstractScrollManager implements PamS private boolean initialisationComplete; - private boolean intialiseLoadDone; + private boolean intialiseLoadDone = false; private StoredScrollerData oldScrollerData = new StoredScrollerData(); @@ -542,12 +542,17 @@ public class ViewerScrollerManager extends AbstractScrollManager implements PamS initialisationComplete = true; break; case PamControllerInterface.INITIALIZE_LOADDATA: - intialiseLoadDone = true; case PamControllerInterface.CHANGED_OFFLINE_DATASTORE: case PamControllerInterface.ADD_CONTROLLEDUNIT: case PamControllerInterface.REMOVE_CONTROLLEDUNIT: - if (initialisationComplete && intialiseLoadDone) { + if (initialisationComplete && intialiseLoadDone == false) { + /* + * changed 20240114 so that this is only called once. Stops it + * from resetting every time the datamap is updated e.g. if the + * acquisition file map changes when user selects correct folder. + */ initialiseScrollers(); + intialiseLoadDone = true; } break; } diff --git a/src/pamguard/Pamguard.java b/src/pamguard/Pamguard.java index 18f8092a..2ede8db9 100644 --- a/src/pamguard/Pamguard.java +++ b/src/pamguard/Pamguard.java @@ -405,7 +405,8 @@ public class Pamguard { // System.out.println("Revision " + PamguardVersionInfo.getRevision()); System.out.println("Build Date " + PamguardVersionInfo.date); writePropertyString("user.dir"); - writePropertyString("java.home"); + writePropertyString("user.home"); // where launched from. + writePropertyString("java.home"); // something in users, e.g. users/dg50 writePropertyString("java.name"); String javaV = writePropertyString("java.version"); writePropertyString("java.vendor");