Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ boolean setup() {
return false; // early exit => save location unusable
}

// make sure that there are positions in the PositionList; a pure read, so it belongs
// above the hardware changes for the same reason as the save location check
if (acqSettings_.isUsingMultiplePositions()) {
final int numPositions = studio_.positions().getPositionList().getNumberOfPositions();
if (numPositions == 0) {
studio_.logs().showError("XY positions expected but the position list is empty");
return false;
}
}

return true;
}

Expand Down Expand Up @@ -401,9 +411,6 @@ public void close() {

// Loop 1: XY positions
PositionList pl = MMStudio.getInstance().positions().getPositionList();
if (acqSettings_.isUsingMultiplePositions() && (pl.getNumberOfPositions() == 0)) {
throw new RuntimeException("XY positions expected but position list is empty");
}

String[] cameraNames;
if (demoMode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ boolean setup() {
return false; // early exit => save location unusable
}

// make sure that there are positions in the PositionList; a pure read, so it belongs
// above the hardware changes below for the same reason as the save location check
if (acqSettings_.isUsingMultiplePositions()) {
final int numPositions = studio_.positions().getPositionList().getNumberOfPositions();
if (numPositions == 0) {
studio_.logs().showError("XY positions expected but the position list is empty");
return false;
}
}

// // check pixel size
// if (core_.getPixelSizeUm() < 1e-6) {
// studio_.logs().showError(
Expand Down Expand Up @@ -120,14 +130,6 @@ boolean setup() {
return false;
}

// make sure that there are positions in the PositionList
if (acqSettings_.isUsingMultiplePositions()) {
final int numPositions = studio_.positions().getPositionList().getNumberOfPositions();
if (numPositions == 0) {
studio_.logs().showError(("XY positions expected but the position list is empty"));
return false;
}
}

return true;
}
Expand Down
Loading