From 7baf6dcefe1f8063716d785d09073a5b3c860152 Mon Sep 17 00:00:00 2001 From: Douglas Gillespie <50671166+douggillespie@users.noreply.github.com> Date: Fri, 27 Jan 2023 14:40:15 +0000 Subject: [PATCH] Couple of fixes including comment out errors in JDJM classiferpanel --- src/PamController/PamguardVersionInfo.java | 2 +- src/PamModel/PamModel.java | 1 + src/SoundRecorder/RecorderControl.java | 4 +- .../SweepClassifierSetPaneFX.java | 65 +++++++++---------- 4 files changed, 37 insertions(+), 35 deletions(-) diff --git a/src/PamController/PamguardVersionInfo.java b/src/PamController/PamguardVersionInfo.java index 67b45c46..072ba3de 100644 --- a/src/PamController/PamguardVersionInfo.java +++ b/src/PamController/PamguardVersionInfo.java @@ -24,7 +24,7 @@ public class PamguardVersionInfo { * PAMGuard can work with. */ static public final String minJavaVersion = "11.0.0"; - static public final String maxJavaVersion = "18.99.99"; + static public final String maxJavaVersion = "19.99.99"; /** diff --git a/src/PamModel/PamModel.java b/src/PamModel/PamModel.java index 00be884a..38539cfe 100644 --- a/src/PamModel/PamModel.java +++ b/src/PamModel/PamModel.java @@ -1258,6 +1258,7 @@ final public class PamModel implements PamModelInterface, PamSettings { String help = null; int ans = WarnOnce.showWarning(PamController.getMainFrame(), title, msg, WarnOnce.WARNING_MESSAGE, help, e1); System.err.println("Exception while loading " + className); + System.err.println(e1.getMessage()); continue; } } diff --git a/src/SoundRecorder/RecorderControl.java b/src/SoundRecorder/RecorderControl.java index eaa28546..0bc2ff72 100644 --- a/src/SoundRecorder/RecorderControl.java +++ b/src/SoundRecorder/RecorderControl.java @@ -436,7 +436,6 @@ public class RecorderControl extends PamControlledUnit implements PamSettings { public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings) { recorderSettings = ((RecorderSettings) pamControlledUnitSettings.getSettings()).clone(); - newParams(); /* * Then check to see if there is a command line override of the currently stored folder name. */ @@ -450,6 +449,9 @@ public class RecorderControl extends PamControlledUnit implements PamSettings { System.err.println("Unable to set recording storage folder " + globFolder); } } + + newParams(); + return true; } diff --git a/src/clickDetector/layoutFX/clickClassifiers/SweepClassifierSetPaneFX.java b/src/clickDetector/layoutFX/clickClassifiers/SweepClassifierSetPaneFX.java index 477b5b78..2ed80884 100644 --- a/src/clickDetector/layoutFX/clickClassifiers/SweepClassifierSetPaneFX.java +++ b/src/clickDetector/layoutFX/clickClassifiers/SweepClassifierSetPaneFX.java @@ -1600,22 +1600,22 @@ public class SweepClassifierSetPaneFX extends SettingsPane { p.setLayout(new GridBagLayout()); GridBagConstraints c = new PamGridBagContraints(); - c.gridx = 0; - addComponent(p, enableBearings, c); - c.gridx += c.gridwidth; - addComponent(p, bearingsExcludeBox, c); - c.gridx += c.gridwidth; - addComponent(p, new JLabel("bearings between ", JLabel.RIGHT), c); - c.gridx += c.gridwidth; - addComponent(p, minBearing, c); - c.gridx += c.gridwidth; - addComponent(p, new JLabel(" and ", JLabel.RIGHT), c); - c.gridx += c.gridwidth; - addComponent(p, maxBearing, c); - c.gridx += c.gridwidth; - addComponent(p, new JLabel("(\u00B0)", JLabel.LEFT), c); - - add(BorderLayout.WEST, p); +// c.gridx = 0; +// addComponent(p, enableBearings, c); +// c.gridx += c.gridwidth; +// addComponent(p, bearingsExcludeBox, c); +// c.gridx += c.gridwidth; +// addComponent(p, new JLabel("bearings between ", JLabel.RIGHT), c); +// c.gridx += c.gridwidth; +// addComponent(p, minBearing, c); +// c.gridx += c.gridwidth; +// addComponent(p, new JLabel(" and ", JLabel.RIGHT), c); +// c.gridx += c.gridwidth; +// addComponent(p, maxBearing, c); +// c.gridx += c.gridwidth; +// addComponent(p, new JLabel("(\u00B0)", JLabel.LEFT), c); +// +// add(BorderLayout.WEST, p); this.multiChan = checkMultiChan(); @@ -1661,7 +1661,6 @@ public class SweepClassifierSetPaneFX extends SettingsPane { return true; } - @Override protected void enableControls() { checkMultiChan(); @@ -1692,22 +1691,22 @@ public class SweepClassifierSetPaneFX extends SettingsPane { private boolean checkMultiChan() { boolean multiChan = false; //do we have multi-channel clicks? - if (clickControl!=null) { - int[] chanGroups = clickControl.getClickParameters().getGroupedSourceParameters().getChannelGroups(); - multiChan = false; - - if (chanGroups==null) return multiChan; - - for (int i=0; i1) { - multiChan = true; - break; - } - } - } - else multiChan = true; +// if (clickControl!=null) { +// int[] chanGroups = clickControl.getClickParameters().getGroupedSourceParameters().getChannelGroups(); +// multiChan = false; +// +// if (chanGroups==null) return multiChan; +// +// for (int i=0; i1) { +// multiChan = true; +// break; +// } +// } +// } +// else multiChan = true; // Debug.out.println("Check multi-channel: " + multiChan); return multiChan;