summaryrefslogtreecommitdiff
path: root/silx/gui/plot/backends/BackendOpenGL.py
diff options
context:
space:
mode:
Diffstat (limited to 'silx/gui/plot/backends/BackendOpenGL.py')
-rw-r--r--silx/gui/plot/backends/BackendOpenGL.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/silx/gui/plot/backends/BackendOpenGL.py b/silx/gui/plot/backends/BackendOpenGL.py
index 0001bb9..9e2cb73 100644
--- a/silx/gui/plot/backends/BackendOpenGL.py
+++ b/silx/gui/plot/backends/BackendOpenGL.py
@@ -28,7 +28,7 @@ from __future__ import division
__authors__ = ["T. Vincent"]
__license__ = "MIT"
-__date__ = "24/04/2018"
+__date__ = "01/08/2018"
from collections import OrderedDict, namedtuple
from ctypes import c_void_p
@@ -1161,11 +1161,15 @@ class BackendOpenGL(BackendBase.BackendBase, glu.OpenGLWidget):
def addMarker(self, x, y, legend, text, color,
selectable, draggable,
- symbol, constraint):
+ symbol, linestyle, linewidth, constraint):
if symbol is None:
symbol = '+'
+ if linestyle != '-' or linewidth != 1:
+ _logger.warning(
+ 'OpenGL backend does not support marker line style and width.')
+
behaviors = set()
if selectable:
behaviors.add('selectable')
@@ -1223,7 +1227,6 @@ class BackendOpenGL(BackendBase.BackendBase, glu.OpenGLWidget):
# Interaction methods
_QT_CURSORS = {
- None: qt.Qt.ArrowCursor,
BackendBase.CURSOR_DEFAULT: qt.Qt.ArrowCursor,
BackendBase.CURSOR_POINTING: qt.Qt.PointingHandCursor,
BackendBase.CURSOR_SIZE_HOR: qt.Qt.SizeHorCursor,
@@ -1232,9 +1235,11 @@ class BackendOpenGL(BackendBase.BackendBase, glu.OpenGLWidget):
}
def setGraphCursorShape(self, cursor):
- cursor = self._QT_CURSORS[cursor]
-
- super(BackendOpenGL, self).setCursor(qt.QCursor(cursor))
+ if cursor is None:
+ super(BackendOpenGL, self).unsetCursor()
+ else:
+ cursor = self._QT_CURSORS[cursor]
+ super(BackendOpenGL, self).setCursor(qt.QCursor(cursor))
def setGraphCursor(self, flag, color, linewidth, linestyle):
if linestyle is not '-':