From 6d24a054b5aca1a828a77250e3bf71885efe2cdc Mon Sep 17 00:00:00 2001 From: Marius S Date: Tue, 3 Dec 2019 16:32:01 +0200 Subject: [PATCH] - fix for toggle grid lines updating canvas only after moving the mouse (hack, actually) --- FlatCAMApp.py | 19 ++++++++++--------- README.md | 1 + 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/FlatCAMApp.py b/FlatCAMApp.py index 56d54856..b06e9f8a 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -5920,15 +5920,6 @@ class App(QtCore.QObject): pass pass self.toggle_grid_lines = True - - # HACK: enabling/disabling the cursor seams to somehow update the shapes on screen - # - perhaps is a bug in VisPy implementation - if self.grid_status() is True: - self.app_cursor.enabled = False - self.app_cursor.enabled = True - else: - self.app_cursor.enabled = True - self.app_cursor.enabled = False else: if self.is_legacy is False: if theme == 'white': @@ -5943,6 +5934,16 @@ class App(QtCore.QObject): pass self.toggle_grid_lines = False + if self.is_legacy is False: + # HACK: enabling/disabling the cursor seams to somehow update the shapes on screen + # - perhaps is a bug in VisPy implementation + if self.grid_status() is True: + self.app_cursor.enabled = False + self.app_cursor.enabled = True + else: + self.app_cursor.enabled = True + self.app_cursor.enabled = False + def show_preferences_gui(self): """ Called to initialize and show the Preferences GUI diff --git a/README.md b/README.md index ea81a204..f6be824d 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ CAD program, and create G-Code for Isolation routing. - updated some of the default values to metric, values that were missed previously - remade the Gerber Editor way to import an Gerber object into the editor in such a way to use the multiprocessing - various small fixes +- fix for toggle grid lines updating canvas only after moving the mouse (hack, actually) 2.12.2019