- made PlotCanvas class inherit from VisPy Canvas instead of creating an instance of it (work of JP)
This commit is contained in:
@@ -3576,7 +3576,7 @@ class FlatCAMGeoEditor(QtCore.QObject):
|
||||
:return: None
|
||||
"""
|
||||
|
||||
self.pos = self.canvas.vispy_canvas.translate_coords(event.pos)
|
||||
self.pos = self.canvas.translate_coords(event.pos)
|
||||
|
||||
if self.app.grid_status() == True:
|
||||
self.pos = self.app.geo_editor.snap(self.pos[0], self.pos[1])
|
||||
@@ -3628,7 +3628,7 @@ class FlatCAMGeoEditor(QtCore.QObject):
|
||||
:param event: Event object dispatched by VisPy SceneCavas
|
||||
:return: None
|
||||
"""
|
||||
pos = self.canvas.vispy_canvas.translate_coords(event.pos)
|
||||
pos = self.canvas.translate_coords(event.pos)
|
||||
event.xdata, event.ydata = pos[0], pos[1]
|
||||
|
||||
self.x = event.xdata
|
||||
@@ -3704,7 +3704,7 @@ class FlatCAMGeoEditor(QtCore.QObject):
|
||||
self.app.selection_type = None
|
||||
|
||||
def on_geo_click_release(self, event):
|
||||
pos_canvas = self.canvas.vispy_canvas.translate_coords(event.pos)
|
||||
pos_canvas = self.canvas.translate_coords(event.pos)
|
||||
|
||||
if self.app.grid_status() == True:
|
||||
pos = self.snap(pos_canvas[0], pos_canvas[1])
|
||||
|
||||
Reference in New Issue
Block a user