Skip to content

Commit 14aa077

Browse files
authored
Fixed #624 and new version 1.7.9 (#625)
1 parent 13ffb24 commit 14aa077

File tree

12 files changed

+443
-559
lines changed

12 files changed

+443
-559
lines changed

common.gradle

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ apply plugin: 'java'
66
apply plugin: 'maven'
77

88
String mavenGroupId = 'org.cirdles'
9-
String mavenVersion = '1.7.8'
9+
String mavenVersion = '1.7.9'
1010

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

1414
repositories {
15-
mavenCentral();
15+
mavenCentral()
1616
// You may define additional repositories, or even remove "mavenCentral()".
1717
// Read more about repositories here:
1818
// http://www.gradle.org/docs/current/userguide/dependency_management.html#sec:repositories
19-
19+
2020
flatDir {
2121
dirs 'libs'
2222
}
@@ -26,7 +26,7 @@ dependencies {
2626
// Adding dependencies here will add the dependencies to each subproject.
2727
//compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.0'
2828
compile group: 'gov.nist.math', name: 'jama', version: '1.0.3'
29-
29+
3030
testCompile "junit:junit:4.13.1"
3131
testCompile "org.assertj:assertj-core:3.18.1"
3232
}
@@ -78,7 +78,7 @@ tasks.withType(JavaCompile) {
7878
}
7979
println 'Compiler args: ' + options.compilerArgs
8080
}
81-
81+
8282
javadoc {
8383
options.tags = [
8484
'pre:a:Precondition:',
@@ -87,7 +87,7 @@ javadoc {
8787
'author:a:Author:'
8888
]
8989
}
90-
90+
9191
if (JavaVersion.current().isJava8Compatible()) {
9292
allprojects {
9393
tasks.withType(Javadoc) {

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

+22-42
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,27 @@
2222
import javafx.fxml.FXML;
2323
import javafx.fxml.Initializable;
2424
import javafx.scene.control.*;
25+
import javafx.scene.layout.HBox;
2526
import javafx.util.StringConverter;
2627
import org.cirdles.squid.constants.Squid3Constants;
2728
import org.cirdles.squid.parameters.parameterModels.ParametersModel;
29+
import org.cirdles.squid.projects.SquidProject;
2830
import org.cirdles.squid.tasks.TaskInterface;
2931
import org.cirdles.squid.tasks.taskDesign.TaskDesign;
3032
import org.cirdles.squid.utilities.squidPrefixTree.SquidPrefixTree;
3133

3234
import java.net.URL;
3335
import java.util.ResourceBundle;
34-
import javafx.scene.layout.HBox;
3536

3637
import static org.cirdles.squid.gui.SquidUIController.squidLabData;
3738
import static org.cirdles.squid.gui.SquidUIController.squidProject;
3839
import static org.cirdles.squid.gui.constants.Squid3GuiConstants.STYLE_MANAGER_TITLE;
39-
import org.cirdles.squid.projects.SquidProject;
4040

4141
/**
4242
* FXML Controller class
4343
*
4444
* @author James F. Bowring
45-
* @see
46-
* <a href="https://courses.bekwam.net/public_tutorials/bkcourse_filterlistapp.html" target="_blank">Bekwam.net</a>
45+
* @see <a href="https://courses.bekwam.net/public_tutorials/bkcourse_filterlistapp.html" target="_blank">Bekwam.net</a>
4746
*/
4847
public class ProjectManagerController implements Initializable {
4948

@@ -143,7 +142,7 @@ public void initialize(URL url, ResourceBundle rb) {
143142
}
144143

145144
orignalPrawnFileName.setEditable(false);
146-
145+
147146
preferredIndexIsotopeLabel.setVisible(squidProject.isTypeGeochron());
148147
isotopeHBox.setVisible(squidProject.isTypeGeochron());
149148
weightedMeansHBox.setVisible(squidProject.isTypeGeochron());
@@ -197,19 +196,6 @@ private void setUpParametersModelsComboBoxes() {
197196
}
198197
}
199198

200-
static class ParameterModelStringConverter extends StringConverter<ParametersModel> {
201-
202-
@Override
203-
public String toString(ParametersModel model) {
204-
return model.getModelNameWithVersion() + (model.isEditable() ? "" : " <Built-in>");
205-
}
206-
207-
@Override
208-
public ParametersModel fromString(String string) {
209-
return null;
210-
}
211-
}
212-
213199
private void setupListeners() {
214200
projectNameText.textProperty().addListener(new ChangeListener<String>() {
215201
@Override
@@ -255,7 +241,7 @@ public void changed(ObservableValue<? extends String> observable, String oldValu
255241
= new SpinnerValueFactory.DoubleSpinnerValueFactory(0.00, 1.00, task.getExtPErrU(), 0.05);
256242
assignedExternalErrUSpinner.setValueFactory(valueFactoryU);
257243
assignedExternalErrUSpinner.valueProperty().addListener((ObservableValue<? extends Double> observable,
258-
Double oldValue, Double newValue) -> {
244+
Double oldValue, Double newValue) -> {
259245
squidProject.setExtPErrU(newValue);
260246
SquidProject.setProjectChanged(true);
261247
task.setExtPErrU(newValue);
@@ -265,7 +251,7 @@ public void changed(ObservableValue<? extends String> observable, String oldValu
265251
= new SpinnerValueFactory.DoubleSpinnerValueFactory(0.00, 1.00, task.getExtPErrTh(), 0.05);
266252
assignedExternalErrThSpinner.setValueFactory(valueFactoryTh);
267253
assignedExternalErrThSpinner.valueProperty().addListener((ObservableValue<? extends Double> observable, //
268-
Double oldValue, Double newValue) -> {
254+
Double oldValue, Double newValue) -> {
269255
squidProject.setExtPErrTh(newValue);
270256
SquidProject.setProjectChanged(true);
271257
task.setExtPErrTh(newValue);
@@ -286,11 +272,11 @@ private void setUpPrawnFile() {
286272

287273
softwareVersionLabel.setText(
288274
"Version: "
289-
+ squidProject.getPrawnFileShrimpSoftwareVersionName());
275+
+ squidProject.getPrawnFileShrimpSoftwareVersionName());
290276

291277
loginCommentLabel.setText(
292278
"Login Comment: "
293-
+ squidProject.getPrawnFileLoginComment());
279+
+ squidProject.getPrawnFileLoginComment());
294280

295281
extractSummaryStatsFromPrawnFile();
296282
}
@@ -347,41 +333,22 @@ private void spotAverageRatioCalcRadioButtonAction(ActionEvent event) {
347333
private void pb204RadioButtonAction(ActionEvent event) {
348334
squidProject.setSelectedIndexIsotope(Squid3Constants.IndexIsoptopesEnum.PB_204);
349335
SquidProject.setProjectChanged(true);
350-
task.setSelectedIndexIsotope(Squid3Constants.IndexIsoptopesEnum.PB_204);
351336
task.setChanged(true);
352337
}
353338

354339
@FXML
355340
private void pb207RadioButtonAction(ActionEvent event) {
356341
squidProject.setSelectedIndexIsotope(Squid3Constants.IndexIsoptopesEnum.PB_207);
357342
SquidProject.setProjectChanged(true);
358-
task.setSelectedIndexIsotope(Squid3Constants.IndexIsoptopesEnum.PB_207);
359343
task.setChanged(true);
360344
}
361345

362346
@FXML
363347
private void pb208RadioButtonAction(ActionEvent event) {
364348
squidProject.setSelectedIndexIsotope(Squid3Constants.IndexIsoptopesEnum.PB_208);
365349
SquidProject.setProjectChanged(true);
366-
task.setSelectedIndexIsotope(Squid3Constants.IndexIsoptopesEnum.PB_208);
367350
task.setChanged(true);
368351
}
369-
//
370-
// @FXML
371-
// private void roundingSquid25Action(ActionEvent event) {
372-
// USE_SIG_FIG_15 = false;
373-
// task.setRoundingForSquid3(false);
374-
// task.setChanged(true);
375-
// task.setupSquidSessionSpecsAndReduceAndReport(true);
376-
// }
377-
//
378-
// @FXML
379-
// private void roundingSquid3Action(ActionEvent event) {
380-
// USE_SIG_FIG_15 = true;
381-
// task.setRoundingForSquid3(true);
382-
// task.setChanged(true);
383-
// task.setupSquidSessionSpecsAndReduceAndReport(true);
384-
// }
385352

386353
@FXML
387354
private void autoExcludeSpotsCheckBoxAction(ActionEvent event) {
@@ -425,4 +392,17 @@ private void refreshModelsAction(ActionEvent event) {
425392
task.refreshParametersFromModels(squidProject.isTypeGeochron(), true, false);
426393
}
427394

428-
}
395+
static class ParameterModelStringConverter extends StringConverter<ParametersModel> {
396+
397+
@Override
398+
public String toString(ParametersModel model) {
399+
return model.getModelNameWithVersion() + (model.isEditable() ? "" : " <Built-in>");
400+
}
401+
402+
@Override
403+
public ParametersModel fromString(String string) {
404+
return null;
405+
}
406+
}
407+
408+
}

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public class SquidUIController implements Initializable {
9090

9191
public static final SquidLabData squidLabData;
9292
public static final SquidPersistentState squidPersistentState = SquidPersistentState.getExistingPersistentState();
93+
private static final Map<String, String> taskLibraryDescriptions = new HashMap<>();
9394
public static SquidProject squidProject;
9495
public static Node taskFolderBrowserUI;
9596
public static Node plotUI;
@@ -101,7 +102,6 @@ public class SquidUIController implements Initializable {
101102
public static SquidReportTableLauncher squidReportTableLauncher;
102103
public static HighlightMainMenu menuHighlighter;
103104
public static int squidProjectOriginalHash;
104-
private static final Map<String, String> taskLibraryDescriptions = new HashMap<>();
105105
private static GridPane projectManagerUI;
106106
private static VBox sessionAuditUI;
107107
private static ScrollPane massesAuditUI;
@@ -720,6 +720,9 @@ private void openProject(String aProjectFileName) throws IOException {
720720
if (squidProject != null) {
721721
synchronizeTaskLabDataAndSquidVersion();
722722

723+
// fixes #624 by correcting out of synch tasks
724+
squidProject.getTask().setSelectedIndexIsotope(squidProject.getSelectedIndexIsotope());
725+
723726
((Task) squidProject.getTask()).buildExpressionDependencyGraphs();
724727
((Task) squidProject.getTask()).updateSquidSpeciesModelsGeochronMode();
725728

0 commit comments

Comments
 (0)