_selection = getMenu("scenario").getSelection();
Study study = _mystudy.getStudyObject();
String[] parse = _selection.split("\\x2E");
- int scindex = Integer.valueOf(parse[0]);
int number = Integer.valueOf(parse[1]);
Scenario[] scene = study.getScenarii();
Scenario bascene = scene[0];
- for (int i = 1; i < scene.length; i++) {
- bascene = scene[i];
- if (bascene.getIndex() == scindex) {
+ for(Scenario scenario : scene) {
+ bascene = scenario;
+ if(bascene.getIndex() == _scindex) {
break;
}
}