Commit 59c39bb2 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add option to generate full model everywhere

parent 7112403f
......@@ -84,7 +84,7 @@ def parse_scene(scene, full_model=False):
pr_data.extend(generate(each))
pr_data.append('ENDBLOCK;')
pr_data.append('ENDSYSTEM;')
print '\n'.join(pr_data)
#print '\n'.join(pr_data)
else:
for each in scene.processes:
......
......@@ -1383,7 +1383,8 @@ class SDL_View(QtGui.QGraphicsView, object):
each.translate_to_origin()
delta_x, delta_y = scene.translate_to_origin()
pr_raw = Pr.parse_scene(scene)
pr_raw = Pr.parse_scene(scene, full_model=True
if not self.readonly_pr else False)
# Move items back to original place to avoid scrollbar jumps
for item in scene.floating_symb:
......@@ -1616,12 +1617,13 @@ class SDL_View(QtGui.QGraphicsView, object):
def generate_ada(self):
''' Generate Ada code '''
# If the current scene is a nested one, save the top parent
# If the current scene is a nested one, move to the top parent
if self.parent_scene:
scene = self.parent_scene[0][0]
else:
scene = self.scene()
pr_raw = Pr.parse_scene(scene)
pr_raw = Pr.parse_scene(scene, full_model=True
if not self.readonly_pr else False)
pr_data = unicode('\n'.join(pr_raw))
if pr_data:
ast, warnings, errors = ogParser.parse_pr(files=self.readonly_pr,
......
Markdown is supported
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