- refactored the is_legacy object to use_3d_engine

- made sure that there is no longer a double action when toggling the object visibility ('plot' attribute)
This commit is contained in:
Marius Stanciu
2021-10-31 14:05:00 +02:00
committed by Marius
parent 25bca44996
commit bb089eb657
34 changed files with 321 additions and 366 deletions

View File

@@ -608,7 +608,7 @@ class ToolFiducials(AppTool):
self.on_exit()
def on_mouse_release(self, event):
if self.app.is_legacy is False:
if self.app.use_3d_engine:
event_pos = event.pos
right_button = 2
self.app.event_is_dragging = self.app.event_is_dragging
@@ -756,7 +756,7 @@ class ToolFiducials(AppTool):
def connect_event_handlers(self):
if self.handlers_connected is False:
if self.app.is_legacy is False:
if self.app.use_3d_engine:
self.app.plotcanvas.graph_event_disconnect('mouse_press', self.app.on_mouse_click_over_plot)
self.app.plotcanvas.graph_event_disconnect('mouse_release', self.app.on_mouse_click_release_over_plot)
else:
@@ -769,7 +769,7 @@ class ToolFiducials(AppTool):
def disconnect_event_handlers(self):
if self.handlers_connected is True:
if self.app.is_legacy is False:
if self.app.use_3d_engine:
self.app.plotcanvas.graph_event_disconnect('mouse_release', self.on_mouse_release)
else:
self.app.plotcanvas.graph_event_disconnect(self.mr)