Merge pull request #37 from PAMGuard/main

Couple of fixes
This commit is contained in:
Douglas Gillespie 2023-01-27 14:43:24 +00:00 committed by GitHub
commit 85d25401a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 35 deletions

View File

@ -24,7 +24,7 @@ public class PamguardVersionInfo {
* PAMGuard can work with. * PAMGuard can work with.
*/ */
static public final String minJavaVersion = "11.0.0"; static public final String minJavaVersion = "11.0.0";
static public final String maxJavaVersion = "18.99.99"; static public final String maxJavaVersion = "19.99.99";
/** /**

View File

@ -1258,6 +1258,7 @@ final public class PamModel implements PamModelInterface, PamSettings {
String help = null; String help = null;
int ans = WarnOnce.showWarning(PamController.getMainFrame(), title, msg, WarnOnce.WARNING_MESSAGE, help, e1); int ans = WarnOnce.showWarning(PamController.getMainFrame(), title, msg, WarnOnce.WARNING_MESSAGE, help, e1);
System.err.println("Exception while loading " + className); System.err.println("Exception while loading " + className);
System.err.println(e1.getMessage());
continue; continue;
} }
} }

View File

@ -436,7 +436,6 @@ public class RecorderControl extends PamControlledUnit implements PamSettings {
public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings) { public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings) {
recorderSettings = ((RecorderSettings) pamControlledUnitSettings.getSettings()).clone(); recorderSettings = ((RecorderSettings) pamControlledUnitSettings.getSettings()).clone();
newParams();
/* /*
* Then check to see if there is a command line override of the currently stored folder name. * 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); System.err.println("Unable to set recording storage folder " + globFolder);
} }
} }
newParams();
return true; return true;
} }

View File

@ -1600,22 +1600,22 @@ public class SweepClassifierSetPaneFX extends SettingsPane<ClickTypeProperty> {
p.setLayout(new GridBagLayout()); p.setLayout(new GridBagLayout());
GridBagConstraints c = new PamGridBagContraints(); GridBagConstraints c = new PamGridBagContraints();
c.gridx = 0; // c.gridx = 0;
addComponent(p, enableBearings, c); // addComponent(p, enableBearings, c);
c.gridx += c.gridwidth; // c.gridx += c.gridwidth;
addComponent(p, bearingsExcludeBox, c); // addComponent(p, bearingsExcludeBox, c);
c.gridx += c.gridwidth; // c.gridx += c.gridwidth;
addComponent(p, new JLabel("bearings between ", JLabel.RIGHT), c); // addComponent(p, new JLabel("bearings between ", JLabel.RIGHT), c);
c.gridx += c.gridwidth; // c.gridx += c.gridwidth;
addComponent(p, minBearing, c); // addComponent(p, minBearing, c);
c.gridx += c.gridwidth; // c.gridx += c.gridwidth;
addComponent(p, new JLabel(" and ", JLabel.RIGHT), c); // addComponent(p, new JLabel(" and ", JLabel.RIGHT), c);
c.gridx += c.gridwidth; // c.gridx += c.gridwidth;
addComponent(p, maxBearing, c); // addComponent(p, maxBearing, c);
c.gridx += c.gridwidth; // c.gridx += c.gridwidth;
addComponent(p, new JLabel("(\u00B0)", JLabel.LEFT), c); // addComponent(p, new JLabel("(\u00B0)", JLabel.LEFT), c);
//
add(BorderLayout.WEST, p); // add(BorderLayout.WEST, p);
this.multiChan = checkMultiChan(); this.multiChan = checkMultiChan();
@ -1661,7 +1661,6 @@ public class SweepClassifierSetPaneFX extends SettingsPane<ClickTypeProperty> {
return true; return true;
} }
@Override
protected void enableControls() { protected void enableControls() {
checkMultiChan(); checkMultiChan();
@ -1692,22 +1691,22 @@ public class SweepClassifierSetPaneFX extends SettingsPane<ClickTypeProperty> {
private boolean checkMultiChan() { private boolean checkMultiChan() {
boolean multiChan = false; boolean multiChan = false;
//do we have multi-channel clicks? //do we have multi-channel clicks?
if (clickControl!=null) { // if (clickControl!=null) {
int[] chanGroups = clickControl.getClickParameters().getGroupedSourceParameters().getChannelGroups(); // int[] chanGroups = clickControl.getClickParameters().getGroupedSourceParameters().getChannelGroups();
multiChan = false; // multiChan = false;
//
if (chanGroups==null) return multiChan; // if (chanGroups==null) return multiChan;
//
for (int i=0; i<chanGroups.length; i++) { // for (int i=0; i<chanGroups.length; i++) {
int chans = clickControl.getClickParameters().getGroupedSourceParameters().getGroupChannels(i); // int chans = clickControl.getClickParameters().getGroupedSourceParameters().getGroupChannels(i);
// Debug.out.println("Check multi-channel: " + chanGroups[i] + " num: " + PamUtils.getNumChannels(chans)); //// Debug.out.println("Check multi-channel: " + chanGroups[i] + " num: " + PamUtils.getNumChannels(chans));
if (PamUtils.getNumChannels(chans)>1) { // if (PamUtils.getNumChannels(chans)>1) {
multiChan = true; // multiChan = true;
break; // break;
} // }
} // }
} // }
else multiChan = true; // else multiChan = true;
// Debug.out.println("Check multi-channel: " + multiChan); // Debug.out.println("Check multi-channel: " + multiChan);
return multiChan; return multiChan;