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.
*/
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;
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;
}
}

View File

@ -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;
}

View File

@ -1600,22 +1600,22 @@ public class SweepClassifierSetPaneFX extends SettingsPane<ClickTypeProperty> {
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<ClickTypeProperty> {
return true;
}
@Override
protected void enableControls() {
checkMultiChan();
@ -1692,22 +1691,22 @@ public class SweepClassifierSetPaneFX extends SettingsPane<ClickTypeProperty> {
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; i<chanGroups.length; i++) {
int chans = clickControl.getClickParameters().getGroupedSourceParameters().getGroupChannels(i);
// Debug.out.println("Check multi-channel: " + chanGroups[i] + " num: " + PamUtils.getNumChannels(chans));
if (PamUtils.getNumChannels(chans)>1) {
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; i<chanGroups.length; i++) {
// int chans = clickControl.getClickParameters().getGroupedSourceParameters().getGroupChannels(i);
//// Debug.out.println("Check multi-channel: " + chanGroups[i] + " num: " + PamUtils.getNumChannels(chans));
// if (PamUtils.getNumChannels(chans)>1) {
// multiChan = true;
// break;
// }
// }
// }
// else multiChan = true;
// Debug.out.println("Check multi-channel: " + multiChan);
return multiChan;