Skip to content

Commit 108e68e

Browse files
authored
Fixed #680 and #681 (#682)
* Updated dependency per Snyk * fixed issue #680 * fixed issue #681 * New version
1 parent 6e17a8a commit 108e68e

File tree

12 files changed

+60
-30
lines changed

12 files changed

+60
-30
lines changed

common.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ apply plugin: 'maven-publish'
77

88

99
String mavenGroupId = 'org.cirdles'
10-
String mavenVersion = '1.9.6'
10+
String mavenVersion = '1.9.7'
1111

1212
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
1313

squidAPI/src/main/java/org/cirdles/squid/Squid3API.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ void newSquid3GeochronProjectFromDataFileOP(Path dataFileOPSourcePath)
104104

105105
void setUseLinearRegression(boolean doUse) throws SquidException;
106106

107-
void setPreferredIndexIsotope(Squid3Constants.IndexIsoptopesEnum isotope);
107+
void setPreferredIndexIsotope(Squid3Constants.IndexIsoptopesEnum isotope) throws SquidException;
108108

109109
void setAutoExcludeSpots(boolean doAutoExclude) throws SquidException;
110110

squidAPI/src/main/java/org/cirdles/squid/Squid3Ink.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ public void setUseLinearRegression(boolean doUse) throws SquidException {
389389
}
390390

391391
@Override
392-
public void setPreferredIndexIsotope(Squid3Constants.IndexIsoptopesEnum isotope) {
392+
public void setPreferredIndexIsotope(Squid3Constants.IndexIsoptopesEnum isotope) throws SquidException {
393393
squid3Project.setSelectedIndexIsotope(isotope);
394394
SquidProject.setProjectChanged(true);
395395
TaskInterface task = squid3Project.getTask();

squidApp/build.gradle

+1-8
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010
// prefer. In this case NetBeans will not add these tasks but you may rely on
1111
// your own implementation.
1212

13-
//apply plugin: "application"
1413
plugins {
1514
id 'application'
16-
// id "org.openjfx.javafxplugin" version "0.0.10"
1715
}
1816

1917
if (!hasProperty('mainClass')) {
@@ -22,16 +20,11 @@ if (!hasProperty('mainClass')) {
2220

2321
mainClassName = 'org.cirdles.squid.gui.SquidUI'
2422

25-
//javafx {
26-
// version = "17"
27-
// modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.web' ]
28-
//}
29-
3023
dependencies {
3124
implementation 'org.jetbrains:annotations:22.0.0'
3225
implementation project(":squidCore")
3326
implementation group: 'org.apache.xmlgraphics', name: 'batik-svg-dom', version: '1.14'
34-
implementation group: 'org.apache.xmlgraphics', name: 'fop', version: '2.6'
27+
implementation group: 'org.apache.xmlgraphics', name: 'fop', version: '2.7'
3528
implementation 'com.github.cirdles:topsoil:87d2f107c0'
3629
// https://mvnrepository.com/artifact/commons-io/commons-io
3730
implementation group: 'commons-io', name: 'commons-io', version: '2.11.0'

squidApp/src/main/java/org/cirdles/squid/gui/ProjectManagerController.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -348,21 +348,21 @@ private void spotAverageRatioCalcRadioButtonAction(ActionEvent event) {
348348
}
349349

350350
@FXML
351-
private void pb204RadioButtonAction(ActionEvent event) {
351+
private void pb204RadioButtonAction(ActionEvent event) throws SquidException {
352352
squidProject.setSelectedIndexIsotope(Squid3Constants.IndexIsoptopesEnum.PB_204);
353353
SquidProject.setProjectChanged(true);
354354
task.setChanged(true);
355355
}
356356

357357
@FXML
358-
private void pb207RadioButtonAction(ActionEvent event) {
358+
private void pb207RadioButtonAction(ActionEvent event) throws SquidException {
359359
squidProject.setSelectedIndexIsotope(Squid3Constants.IndexIsoptopesEnum.PB_207);
360360
SquidProject.setProjectChanged(true);
361361
task.setChanged(true);
362362
}
363363

364364
@FXML
365-
private void pb208RadioButtonAction(ActionEvent event) {
365+
private void pb208RadioButtonAction(ActionEvent event) throws SquidException {
366366
squidProject.setSelectedIndexIsotope(Squid3Constants.IndexIsoptopesEnum.PB_208);
367367
SquidProject.setProjectChanged(true);
368368
task.setChanged(true);

squidApp/src/main/java/org/cirdles/squid/gui/SquidUIController.java

+2
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ private void openProject(String aProjectFileName) throws IOException, SquidExcep
748748

749749
// fixes #624 by correcting out of synch tasks
750750
squidProject.getTask().setSelectedIndexIsotope(squidProject.getSelectedIndexIsotope());
751+
squidProject.getTask().setChanged(true);
752+
squidProject.getTask().setupSquidSessionSpecsAndReduceAndReport(false);
751753

752754
((Task) squidProject.getTask()).buildExpressionDependencyGraphs();
753755
((Task) squidProject.getTask()).updateSquidSpeciesModelsGeochronMode();

squidApp/src/main/java/org/cirdles/squid/gui/dateInterpretations/plots/plotControllers/RefMatCalibrationConstantWMToolBoxNode.java

+15-3
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,25 @@ public void changed(ObservableValue<? extends Toggle> observable, Toggle oldValu
128128
correction = ((String) isotopeGroup.getSelectedToggle().getUserData());
129129
switch (correction.substring(0, 1)) {
130130
case "4":
131-
squidProject.setSelectedIndexIsotope(PB_204);
131+
try {
132+
squidProject.setSelectedIndexIsotope(PB_204);
133+
} catch (SquidException e) {
134+
e.printStackTrace();
135+
}
132136
break;
133137
case "7":
134-
squidProject.setSelectedIndexIsotope(PB_207);
138+
try {
139+
squidProject.setSelectedIndexIsotope(PB_207);
140+
} catch (SquidException e) {
141+
e.printStackTrace();
142+
}
135143
break;
136144
default: // case 8
137-
squidProject.setSelectedIndexIsotope(PB_208);
145+
try {
146+
squidProject.setSelectedIndexIsotope(PB_208);
147+
} catch (SquidException e) {
148+
e.printStackTrace();
149+
}
138150
}
139151
squidProject.getTask().setChanged(true);
140152

squidApp/src/main/java/org/cirdles/squid/gui/dateInterpretations/plots/plotControllers/RefMatConcordiaToolBoxNode.java

+15-3
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,25 @@ public void changed(ObservableValue<? extends Toggle> observable, Toggle oldValu
108108
correction = ((String) isotopeGroup.getSelectedToggle().getUserData());
109109
switch (correction.substring(0, 1)) {
110110
case "4":
111-
squidProject.setSelectedIndexIsotope(PB_204);
111+
try {
112+
squidProject.setSelectedIndexIsotope(PB_204);
113+
} catch (SquidException e) {
114+
e.printStackTrace();
115+
}
112116
break;
113117
case "7":
114-
squidProject.setSelectedIndexIsotope(PB_207);
118+
try {
119+
squidProject.setSelectedIndexIsotope(PB_207);
120+
} catch (SquidException e) {
121+
e.printStackTrace();
122+
}
115123
break;
116124
default: // case 8
117-
squidProject.setSelectedIndexIsotope(PB_208);
125+
try {
126+
squidProject.setSelectedIndexIsotope(PB_208);
127+
} catch (SquidException e) {
128+
e.printStackTrace();
129+
}
118130
}
119131

120132
squidProject.getTask().setChanged(true);

squidCore/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies {
2626
implementation "org.apache.commons:commons-math3:3.6.1"
2727
implementation group: 'com.google.guava', name: 'guava', version: '31.0.1-jre'
2828

29-
implementation group: 'com.thoughtworks.xstream', name: 'xstream', version: '1.4.18'
29+
implementation group: 'com.thoughtworks.xstream', name: 'xstream', version: '1.4.19'
3030

3131
antlr 'org.antlr:antlr4:4.9.3'
3232
implementation group: 'org.antlr', name: 'antlr4-runtime', version: '4.9.3'

squidCore/src/main/java/org/cirdles/squid/projects/Squid3ProjectBasicAPI.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public boolean setupPrawnOPFile(File opFileNew)
164164
/**
165165
* @param selectedIndexIsotope the selectedIndexIsotope to set
166166
*/
167-
void setSelectedIndexIsotope(Squid3Constants.IndexIsoptopesEnum selectedIndexIsotope);
167+
void setSelectedIndexIsotope(Squid3Constants.IndexIsoptopesEnum selectedIndexIsotope) throws SquidException;
168168

169169
/**
170170
* @return the sessionDurationHours

squidCore/src/main/java/org/cirdles/squid/projects/SquidProject.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ public void createNewTask() throws SquidException {
227227
this.task.setCommonPbModel(commonPbModel);
228228
this.task.setPhysicalConstantsModel(physicalConstantsModel);
229229
this.task.setSelectedIndexIsotope(selectedIndexIsotope);
230+
this.task.setupSquidSessionSpecsAndReduceAndReport(false);
230231
this.task.setSquidAllowsAutoExclusionOfSpots(squidAllowsAutoExclusionOfSpots);
231232
this.task.setExtPErrU(extPErrU);
232233
this.task.setExtPErrTh(extPErrTh);
@@ -1339,9 +1340,11 @@ public Squid3Constants.IndexIsoptopesEnum getSelectedIndexIsotope() {
13391340
/**
13401341
* @param selectedIndexIsotope the selectedIndexIsotope to set
13411342
*/
1342-
public void setSelectedIndexIsotope(Squid3Constants.IndexIsoptopesEnum selectedIndexIsotope) {
1343+
public void setSelectedIndexIsotope(Squid3Constants.IndexIsoptopesEnum selectedIndexIsotope) throws SquidException {
13431344
if (task != null) {
13441345
task.setSelectedIndexIsotope(selectedIndexIsotope);
1346+
task.setChanged(true);
1347+
task.setupSquidSessionSpecsAndReduceAndReport(false);
13451348
}
13461349
this.selectedIndexIsotope = selectedIndexIsotope;
13471350
}

squidCore/src/main/java/org/cirdles/squid/tasks/Task.java

+15-7
Original file line numberDiff line numberDiff line change
@@ -3389,11 +3389,11 @@ public IndexIsoptopesEnum getSelectedIndexIsotope() {
33893389
@Override
33903390
public void setSelectedIndexIsotope(IndexIsoptopesEnum selectedIndexIsotope) {
33913391
this.selectedIndexIsotope = selectedIndexIsotope;
3392-
try {
3393-
changed = true;
3394-
setupSquidSessionSpecsAndReduceAndReport(false);
3395-
} catch (SquidException squidException) {
3396-
}
3392+
// try {
3393+
// changed = true;
3394+
// setupSquidSessionSpecsAndReduceAndReport(false);
3395+
// } catch (SquidException squidException) {
3396+
// }
33973397
}
33983398

33993399
@Override
@@ -3872,7 +3872,11 @@ public int hashCode() {
38723872
*/
38733873
public String getxAxisExpressionName() {
38743874
if (xAxisExpressionName == null) {
3875-
xAxisExpressionName = "204/206";
3875+
if (namedExpressionsMap.containsKey("LnUOU")) {
3876+
xAxisExpressionName = "LnUOU";
3877+
} else {
3878+
xAxisExpressionName = "204/206";
3879+
}
38763880
}
38773881
return xAxisExpressionName;
38783882
}
@@ -3889,7 +3893,11 @@ public void setxAxisExpressionName(String xAxisExpressionName) {
38893893
*/
38903894
public String getyAxisExpressionName() {
38913895
if (yAxisExpressionName == null) {
3892-
yAxisExpressionName = "204/206";
3896+
if (namedExpressionsMap.containsKey("LnPbU")) {
3897+
yAxisExpressionName = "LnPbU";
3898+
} else {
3899+
yAxisExpressionName = "204/206";
3900+
}
38933901
}
38943902
return yAxisExpressionName;
38953903
}

0 commit comments

Comments
 (0)