From: mka Date: Thu, 4 Apr 2013 12:07:33 +0000 (+0000) Subject: Now the new scenario is added after the selected one correctly. X-Git-Tag: Root_Delivery2_2013_04_22~57 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2d7c62b874bcdcb9560b28c9fa60347e9befd4c9;p=tools%2Fsiman.git Now the new scenario is added after the selected one correctly. --- diff --git a/Workspace/Siman/src/org/splat/simer/NewScenarioAction.java b/Workspace/Siman/src/org/splat/simer/NewScenarioAction.java index 1ff8b0a..9b22caf 100644 --- a/Workspace/Siman/src/org/splat/simer/NewScenarioAction.java +++ b/Workspace/Siman/src/org/splat/simer/NewScenarioAction.java @@ -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; } }