- added mouse events disconnect in the quit_application() method

This commit is contained in:
Marius Stanciu 2020-06-05 07:19:53 +03:00 committed by Marius
parent 2107a4766f
commit 951744d6fa
2 changed files with 17 additions and 0 deletions

View File

@ -15,6 +15,7 @@ CHANGELOG for FlatCAM beta
- Tool Calculators: allowed comma to be used as decimal separator
- changed how the import of svg.path module is done in the ParseSVG.py file
- Tool Isolation - new feature that allow to isolate interiors of polygons (holes in polygons). It is possible that the isolation to be reported as successful (internal limitations) but some interiors to not be isolated. This way the user get to fix the isolation by doing an extra isolation.
- added mouse events disconnect in the quit_application() method
4.06.2020

View File

@ -3219,6 +3219,22 @@ class App(QtCore.QObject):
pass
log.debug("App.quit_application() --> Gerber Editor deactivated.")
# disconnect the mouse events
if self.is_legacy:
self.plotcanvas.graph_event_disconnect(self.mm)
self.plotcanvas.graph_event_disconnect(self.mp)
self.plotcanvas.graph_event_disconnect(self.mr)
self.plotcanvas.graph_event_disconnect(self.mdc)
self.plotcanvas.graph_event_disconnect(self.kp)
else:
self.mm = self.plotcanvas.graph_event_disconnect('mouse_move', self.on_mouse_move_over_plot)
self.mp = self.plotcanvas.graph_event_disconnect('mouse_press', self.on_mouse_click_over_plot)
self.mr = self.plotcanvas.graph_event_disconnect('mouse_release', self.on_mouse_click_release_over_plot)
self.mdc = self.plotcanvas.graph_event_disconnect('mouse_double_click',
self.on_mouse_double_click_over_plot)
self.kp = self.plotcanvas.graph_event_disconnect('key_press', self.ui.keyPressEvent)
self.preferencesUiManager.save_defaults(silent=True)
log.debug("App.quit_application() --> App Defaults saved.")