Skip to content
Snippets Groups Projects
Commit a7e9e209 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Selection cursor is only drawn on the target canvas on mouse

moves. Greatly improves performance when running over X11
parent a1bed04c
No related branches found
No related tags found
No related merge requests found
...@@ -840,16 +840,16 @@ class OrthoEditProfile(orthoviewprofile.OrthoViewProfile): ...@@ -840,16 +840,16 @@ class OrthoEditProfile(orthoviewprofile.OrthoViewProfile):
On all lower performance settings, only the source canvas is updated. On all lower performance settings, only the source canvas is updated.
""" """
perf = self._viewPanel.getSceneOptions().performance perf = self._viewPanel.getSceneOptions().performance
if perf == 4:
if mousePos is None or canvasPos is None: # If running in high performance mode, we make
self._viewPanel.Refresh() # the canvas location track the edit cursor
# location, so that the other two canvases
# If running in high performance mode, we make # update to display the current cursor location.
# the canvas location track the edit cursor if perf == 4 and \
# location, so that the other two canvases (mousePos is not None) and \
# update to display the current cursor location. (canvasPos is not None):
else: self._navModeLeftMouseDrag(ev, canvas, mousePos, canvasPos)
self._navModeLeftMouseDrag(ev, canvas, mousePos, canvasPos)
else: else:
canvas.Refresh() canvas.Refresh()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment