- 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
This commit is contained in:
Marius Stanciu
2022-05-05 18:25:29 +03:00
committed by Marius
parent fed9369023
commit 181a392cec
2 changed files with 10 additions and 1 deletions

View File

@@ -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()