Skip to content

Commit 9c80e21

Browse files
authored
Merge pull request #27 from GReD-Clermont/bugfix
Bugfix for project processing not starting up
2 parents 41c670c + c251ebe commit 9c80e21

2 files changed

Lines changed: 16 additions & 9 deletions

File tree

‎pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<groupId>fr.igred</groupId>
1313
<artifactId>omero_batch-plugin</artifactId>
14-
<version>2.1.0</version>
14+
<version>2.1.1</version>
1515

1616
<name>omero_batch-plugin</name>
1717
<description>ImageJ plugin to batch process images from OMERO.</description>

‎src/main/java/fr/igred/ij/plugin/frame/OMEROBatchPlugin.java‎

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,22 +1478,29 @@ private boolean getMacro() {
14781478
* @return True if the selection is ok.
14791479
*/
14801480
private boolean getOMEROOutput() {
1481-
boolean check = false;
1481+
boolean check = true;
14821482
if (onlineOutput.isSelected()) {
14831483
int projIndex = projectListOut.getSelectedIndex();
14841484
int datIndex = datasetListOut.getSelectedIndex();
14851485
int screenIndex = screenListOut.getSelectedIndex();
14861486
String newDatasetName = newDatasetOut.getText();
1487-
if (projIndex == -1 || projIndex > myProjects.size()) {
1488-
errorWindow(String.format("Output:%nNo project selected"));
1489-
} else if (datIndex == -1 || datIndex > myDatasets.size()) {
1490-
errorWindow(String.format("Output:%nNo dataset selected"));
1487+
if (omeroProjects.isSelected()) {
1488+
if (projIndex == -1 || projIndex > myProjects.size()) {
1489+
errorWindow(String.format("Output:%nNo project selected"));
1490+
check = false;
1491+
} else if (datIndex == -1 || datIndex > myDatasets.size()) {
1492+
errorWindow(String.format("Output:%nNo dataset selected"));
1493+
check = false;
1494+
}
14911495
} else if (screenIndex == -1 || screenIndex > myScreens.size()) {
14921496
errorWindow(String.format("Output:%nNo screen selected"));
1493-
} else if (newDatasetOut.getParent().isVisible() && newDatasetName.isEmpty()) {
1497+
check = false;
1498+
}
1499+
if (newDatasetOut.getParent().isVisible() && newDatasetName.isEmpty()) {
14941500
errorWindow(String.format("Output:%nNo name set for the output dataset"));
1495-
} else {
1496-
check = true;
1501+
check = false;
1502+
}
1503+
if(check){
14971504
if (omeroProjects.isSelected()) {
14981505
DatasetWrapper dataset = myDatasets.get(datIndex);
14991506
ProjectWrapper project = myProjects.get(projIndex);

0 commit comments

Comments
 (0)