use cross hen cursor small
@@ -861,21 +861,24 @@ class QtViewer(QSplitter):
def _on_cursor(self):
"""Set the appearance of the mouse cursor."""
+
cursor = self.viewer.cursor.style
+ if cursor in {'square', 'circle'}:
+
# Scale size by zoom if needed
- if self.viewer.cursor.scaled:
- size = self.viewer.cursor.size * self.viewer.camera.zoom
- else:
size = self.viewer.cursor.size
+ if self.viewer.cursor.scaled:
+ size *= self.viewer.camera.zoom
+
size = int(size)
- if cursor == 'square':
+
# make sure the square fits within the current canvas
if size < 8 or size > (min(*self.canvas.size) - 4):
q_cursor = self._cursors['cross']
- else:
- q_cursor = QCursor(square_pixmap(size))
elif cursor == 'circle':
q_cursor = QCursor(circle_pixmap(size))
+ else:
+ q_cursor = QCursor(square_pixmap(size))
elif cursor == 'crosshair':
q_cursor = QCursor(crosshair_pixmap())
else:
