Skip to content

Commit

Permalink
Merge branch 'main' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
KochTobi committed Jul 17, 2023
2 parents ca336d3 + b0e9f16 commit 92f008c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ private void generateSampleRegistrationLayout() {
sampleSpreadsheetLayout.setBatchName(batchInformationLayout.batchNameField.getValue());
ExperimentId selectedExperimentId = batchInformationLayout.experimentSelect.getValue()
.experimentId();
//We only reload the spreadsheet if the selected experiment was changed
//We only reload the spreadsheet if the selected experiment was changed (or dialog closed)
if (sampleSpreadsheetLayout.getExperiment() == null || !selectedExperimentId.equals(
sampleSpreadsheetLayout.getExperiment())) {
sampleSpreadsheetLayout.setExperiment(batchInformationLayout.experimentSelect.getValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ void unlockCellsToRow(Spreadsheet spreadsheet, int maxRow, int column) {

//an unused cell is either null or empty (not blank)
private boolean isCellUnused(Cell cell) {
return cell == null || cell.getStringCellValue().isEmpty();
return cell == null || SpreadsheetMethods.cellToStringOrNull(cell).isEmpty();
}


Expand All @@ -293,7 +293,7 @@ void fixColumnWidth(int colIndex, String colLabel,
if (cell == null) {
this.createCell(0, colIndex, spacingValue);
} else {
oldValue = cell.getStringCellValue();
oldValue = SpreadsheetMethods.cellToStringOrNull(cell);
this.getCell(0, colIndex).setCellValue(spacingValue);
}
//Todo Find out why switching from a sheet with less columns to a sheet with more columns breaks the sheet(e.g. lipidomics to genomics)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ public void generateSampleRegistrationSheet(MetadataType metaDataType) {
}

public void reset() {
//this needs to be reset when dialog is closed, as the sheet will not be recreated for set experiments
experiment = null;
sampleInformationLayoutHandler.reset();
}

Expand Down

0 comments on commit 92f008c

Please sign in to comment.