- made PlotCanvas class inherit from VisPy Canvas instead of creating an instance of it (work of JP)
This commit is contained in:
@@ -4069,7 +4069,7 @@ class FlatCAMGrbEditor(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])
|
||||
@@ -4132,7 +4132,7 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
||||
def on_grb_click_release(self, event):
|
||||
self.modifiers = QtWidgets.QApplication.keyboardModifiers()
|
||||
|
||||
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.app.geo_editor.snap(pos_canvas[0], pos_canvas[1])
|
||||
else:
|
||||
@@ -4264,7 +4264,7 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
||||
:return: None
|
||||
"""
|
||||
|
||||
pos_canvas = self.canvas.vispy_canvas.translate_coords(event.pos)
|
||||
pos_canvas = self.canvas.translate_coords(event.pos)
|
||||
event.xdata, event.ydata = pos_canvas[0], pos_canvas[1]
|
||||
|
||||
self.x = event.xdata
|
||||
|
||||
Reference in New Issue
Block a user