Skip to content

Commit

Permalink
- Return the correct number of components even if the placement annot…
Browse files Browse the repository at this point in the history
…ation for a component is not found.

- If the result count is not correct for some reasons don't allow the GUI to crash.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16850 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Aug 19, 2013
1 parent 84c0589 commit 835da1f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Compiler/Script/Interactive.mo
Expand Up @@ -13857,14 +13857,19 @@ algorithm
SOME(Absyn.ANNOTATION(annotations)),
_))) :: rest),env,_,_,_)
equation

res = getComponentitemsAnnotationsElArgs(annotations,env,inClass,inFullProgram,inModelPath);
gexpstr = stringDelimitList(res, ", ");

gexpstr_1 = stringAppendList({"{",gexpstr,"}"});
res = getComponentitemsAnnotationsFromItems(rest, env, inClass,inFullProgram,inModelPath);
then
(gexpstr_1 :: res);

case ((Absyn.COMPONENTITEM(comment = SOME(Absyn.COMMENT(_,_))) :: rest),env,_,_,_)
equation
res = getComponentitemsAnnotationsFromItems(rest, env, inClass,inFullProgram,inModelPath);
then
("{}" :: res);

case ((Absyn.COMPONENTITEM(comment = NONE()) :: (rest as (_ :: _))),env, _,_,_)
equation
Expand Down

0 comments on commit 835da1f

Please sign in to comment.