Commit 34951cf3 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Minor bugfix when trying to save a model with no scene

parent 7cfbd7d5
......@@ -242,6 +242,8 @@ class Channel(Connection):
super(Channel, self).__init__(process, process)
self.label_in = QGraphicsTextItem('[]', parent=self)
self.label_out = QGraphicsTextItem('[]', parent=self)
#self.label_in.setTextInteractionFlags(Qt.TextEditorInteraction)
#self.label_out.setTextInteractionFlags(Qt.TextEditorInteraction)
if not Channel.in_sig:
# keep at class level as long as only one process is supported
# when copy-pasting a process the challel in/out signal lists
......
......@@ -1308,6 +1308,11 @@ class SDL_View(QtGui.QGraphicsView, object):
scene = self.parent_scene[0][0]
else:
scene = self.scene()
if not scene:
LOG.info('No scene - nothing to save')
return False
# Translate scenes to avoid negative coordinates
for each in scene.all_nested_scenes:
each.translate_to_origin()
......
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