Fix lag between moving mouse and view updating.

On mouse move, redraw view after calling view actions, not before.
This commit is contained in:
David Vierra 2015-06-04 02:31:55 -10:00
parent 65a17d93d9
commit 208069beed

View File

@ -388,8 +388,6 @@ class WorldView(QGLWidget):
action.mousePressEvent(event) action.mousePressEvent(event)
def mouseMoveEvent(self, event): def mouseMoveEvent(self, event):
self.cursorMoved.emit(event)
self.update()
self.augmentMouseEvent(event) self.augmentMouseEvent(event)
for action in self.viewActions: for action in self.viewActions:
if not action.button or action.button == event.buttons() or action.button & event.buttons(): if not action.button or action.button == event.buttons() or action.button & event.buttons():
@ -397,6 +395,8 @@ class WorldView(QGLWidget):
if action.modifiers & event.modifiers() or action.modifiers == event.modifiers(): if action.modifiers & event.modifiers() or action.modifiers == event.modifiers():
if not action.key or action.key in self.pressedKeys: if not action.key or action.key in self.pressedKeys:
action.mouseMoveEvent(event) action.mouseMoveEvent(event)
self.cursorMoved.emit(event)
self.update()
def mouseReleaseEvent(self, event): def mouseReleaseEvent(self, event):
self.augmentMouseEvent(event) self.augmentMouseEvent(event)