From ba8b16e54ffceb323468596d56f92ca0ba491a9d Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Wed, 19 Jan 2022 21:35:26 +0200 Subject: [PATCH] - fixed some issues due of the above hack --- CHANGELOG.md | 1 + appGUI/MainGUI.py | 2 +- app_Main.py | 34 ++++++++++++++++++++-------------- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d5a2f7f..cce56528 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ CHANGELOG for FlatCAM beta - added comments in the `default` preprocessors which will help other people create their own preprocessors - remade the Image Import plugin in an attempt to fix issues with the latest packages of Gdal and Rasterio but it looks that it is a conflict between the Rasterio 1.2.10, Gdal 3.4.1 and Shapely 1.8.0 - made a hack so if the Image Import plugin can't be loaded due of dependencies errors the app will not crash but this plugin will no longer be available +- fixed some issues due of the above hack 18.01.2022 diff --git a/appGUI/MainGUI.py b/appGUI/MainGUI.py index 9bb3a0ad..943277af 100644 --- a/appGUI/MainGUI.py +++ b/appGUI/MainGUI.py @@ -3102,7 +3102,7 @@ class MainGUI(QtWidgets.QMainWindow): self.app.fiducial_tool.run(toggle=True) return - # Punch Gerber Tool + # Invert Gerber Tool if key == QtCore.Qt.Key.Key_G: self.app.invert_tool.run(toggle=True) diff --git a/app_Main.py b/app_Main.py index 5a587f90..f71ac666 100644 --- a/app_Main.py +++ b/app_Main.py @@ -6852,10 +6852,10 @@ class App(QtCore.QObject): # first do the Plugin cleanup # ######################################################################################################### for plugin in self.app_plugins: - # execute this only for the current active plugin - if self.ui.notebook.tabText(found_idx) != plugin.pluginName: - continue try: + # execute this only for the current active plugin + if self.ui.notebook.tabText(found_idx) != plugin.pluginName: + continue plugin.on_plugin_cleanup() except AttributeError: # not all plugins have this implemented @@ -7825,14 +7825,17 @@ class App(QtCore.QObject): tab_idx = self.ui.notebook.currentIndex() for plugin in self.app_plugins: - # execute this only for the current active plugin - if self.ui.notebook.tabText(tab_idx) != plugin.pluginName: - continue try: - plugin.on_plugin_mouse_click_release(pos) + # execute this only for the current active plugin + if self.ui.notebook.tabText(tab_idx) != plugin.pluginName: + continue + try: + plugin.on_plugin_mouse_click_release(pos) + except AttributeError: + # not all plugins have this implemented + # print("This does not have it", self.ui.notebook.tabText(tab_idx)) + pass except AttributeError: - # not all plugins have this implemented - # print("This does not have it", self.ui.notebook.tabText(tab_idx)) pass def on_plugin_mouse_move(self, pos): @@ -7850,13 +7853,16 @@ class App(QtCore.QObject): tab_idx = self.ui.notebook.currentIndex() for plugin in self.app_plugins: # execute this only for the current active plugin - if self.ui.notebook.tabText(tab_idx) != plugin.pluginName: - continue try: - plugin.on_plugin_mouse_move(pos) + if self.ui.notebook.tabText(tab_idx) != plugin.pluginName: + continue + try: + plugin.on_plugin_mouse_move(pos) + except AttributeError: + # not all plugins have this implemented + # print("This does not have it", self.ui.notebook.tabText(tab_idx)) + pass except AttributeError: - # not all plugins have this implemented - # print("This does not have it", self.ui.notebook.tabText(tab_idx)) pass def delete_hover_shape(self):