]> SALOME platform Git repositories - tools/siman.git/commitdiff
Salome HOME
Now the new scenario is added after the selected one correctly.
authormka <mka@opencascade.com>
Thu, 4 Apr 2013 12:07:33 +0000 (12:07 +0000)
committermka <mka@opencascade.com>
Thu, 4 Apr 2013 12:07:33 +0000 (12:07 +0000)
Workspace/Siman/src/org/splat/simer/NewScenarioAction.java

index 1ff8b0abe4545fa4b94fc35282b0d994e28e313e..9b22caffc7ea7481771b5a876dfb0a9d5acff98d 100644 (file)
@@ -109,14 +109,13 @@ public class NewScenarioAction extends Action {
                        _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;
                                }
                        }