From 181a392cec3a2f66ee9fd0c831b3ac7f69687b28 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Thu, 5 May 2022 18:25:29 +0300 Subject: [PATCH] - added a hack so the dark stylesheet for QWidget is reapplied if that Qwidget is removed (I don't know why it is lost in the first time) - when exiting an Editor with a sub-tool active the cursor data display feature is removed --- CHANGELOG.md | 1 + appMain.py | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0847466c..fc87c0f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ CHANGELOG for FlatCAM Evo beta - changed some of the dark theme icons to the red color - made sure that the draw color in Editors is inverted for the dark mode - added a hack so the dark stylesheet for QWidget is reapplied if that Qwidget is removed (I don't know why it is lost in the first time) +- when exiting an Editor with a sub-tool active the cursor data display feature is removed 4.05.2020 diff --git a/appMain.py b/appMain.py index e67cf177..a5323e43 100644 --- a/appMain.py +++ b/appMain.py @@ -2734,10 +2734,18 @@ class App(QtCore.QObject): """ self.defaults.report_usage("editor2object()") - # do not update a geometry or excellon object unless it comes out of an editor + # do not update a Geometry/Excellon/Gerber/GCode object unless it comes out of an editor if self.call_source == 'app': return + # make sure that when we exit an Editor with a tool active then we make some clean-up + try: + if self.use_3d_engine: + self.plotcanvas.text_cursor.parent = None + self.plotcanvas.view.camera.zoom_callback = lambda *args: None + except Exception: + pass + # This is the object that exit from the Editor. It may be the edited object but it can be a new object # created by the Editor edited_obj = self.collection.get_active()