- in Geometry Editor for the Path tool but only when using the 3D engine graphic mode, the mouse cursor is followed by position data
This commit is contained in:
@@ -166,6 +166,9 @@ class PlotCanvas(QtCore.QObject, VisPyCanvas):
|
||||
|
||||
self.on_update_text_hud()
|
||||
|
||||
# cursor text t obe attached to mouse cursor in Editors
|
||||
self.text_cursor = Text('', color=self.text_hud_color, method='gpu', anchor_x='left', parent=None)
|
||||
|
||||
# draw a rectangle made out of 4 lines on the canvas to serve as a hint for the work area
|
||||
# all CNC have a limited workspace
|
||||
if self.fcapp.options['global_workspace'] is True:
|
||||
|
||||
@@ -141,6 +141,8 @@ class Camera(scene.PanZoomCamera):
|
||||
# Default mouse button for panning is RMB
|
||||
self.pan_button_setting = "2"
|
||||
|
||||
self.zoom_callback = lambda *args: None
|
||||
|
||||
def zoom(self, factor, center=None):
|
||||
center = center if (center is not None) else self.center
|
||||
super(Camera, self).zoom(factor, center)
|
||||
@@ -183,6 +185,9 @@ class Camera(scene.PanZoomCamera):
|
||||
center = self._scene_transform.imap(event.pos)
|
||||
scale = (1 + self.zoom_factor) ** (-event.delta[1] * 30)
|
||||
self.limited_zoom(scale, center)
|
||||
|
||||
if self.zoom_callback:
|
||||
self.zoom_callback()
|
||||
event.handled = True
|
||||
|
||||
elif event.type == 'mouse_move':
|
||||
|
||||
Reference in New Issue
Block a user