Commit 0170baaa authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Fix CHOICE_NOT_FOUND issue in Ada backend

parent 161841dd
......@@ -135,6 +135,9 @@ The background pattern was downloaded from www.subtlepatterns.com
Changelog
=========
2.0.11 (06/2018)
- Ada backend: fix choice determinant issue leading to CHOICE_NOT_FOUND bug
2.0.10 (06/2018)
- Various fixes in statechart rendering, esp. from command line
......
......@@ -2415,8 +2415,10 @@ def _choiceitem(choice):
# is a namespace conflict)
basic = find_basic_type(choice.exprType)
prefix = 'CHOICE_NOT_FOUND'
search = choice.value['choice'].lower().replace('-', '_')
for each in basic.Children:
if each.lower() == choice.value['choice'].lower():
choice = each.lower().replace('-', '_')
if choice == search:
prefix = basic.Children[each].EnumID
break
ada_string = u'(Kind => {kind}, {opt} => {expr})'.format(
......
......@@ -141,7 +141,7 @@ except ImportError:
__all__ = ['opengeode', 'SDL_Scene', 'SDL_View', 'parse']
__version__ = '2.0.10'
__version__ = '2.0.11'
if hasattr(sys, 'frozen'):
# Detect if we are running on Windows (py2exe-generated)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment