Commit 6448acbe authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Fix ensureVisible

parent b5976aa5
......@@ -1132,7 +1132,7 @@ class SDL_Scene(QtGui.QGraphicsScene, object):
item.edit_text()
for view in self.views():
view.refresh()
view.view_refresh()
view.ensureVisible(item)
return item
......@@ -1611,7 +1611,7 @@ class SDL_View(QtGui.QGraphicsView, object):
self.up_button.setEnabled(True)
self.set_toolbar()
self.scene().scene_left.emit()
self.refresh()
self.view_refresh()
# pylint: disable=C0103
def mouseDoubleClickEvent(self, evt):
......@@ -1932,7 +1932,7 @@ class SDL_View(QtGui.QGraphicsView, object):
self.scene().clear_focus()
symbol.select()
self.scene().highlight(symbol)
symbol.ensureVisible()
self.ensureVisible(symbol)
else:
LOG.info('No symbol at given coordinates in the current scene')
......
......@@ -116,7 +116,11 @@ class InsertSymbol(QUndoCommand):
self.item.show()
self.item.grabber.display()
try:
self.scene.refresh()
# Immediate refresh for a better rendering, howerver slows down
# performance when inserting decisions in a complex model
#self.scene.refresh()
# Update only the connections - this is much faster
self.item.update_connections()
except AttributeError:
pass
......
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