- trying to solve an idiosyncrasy of MacOS which do not allow modifying the main menu in a non-main thread which is done after editing an object

This commit is contained in:
Marius Stanciu
2023-11-14 21:49:17 +02:00
parent a7c909273b
commit 4458249ee5
13 changed files with 100 additions and 95 deletions

View File

@@ -545,7 +545,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
self.ui.review_gcode_button.clicked.connect(self.on_review_code_click)
# Editor Signal
self.ui.editor_button.clicked.connect(lambda: self.app.object2editor())
self.ui.editor_button.clicked.connect(lambda: self.app.on_editing_start())
# Properties
self.ui.info_button.toggled.connect(self.on_properties)

View File

@@ -164,7 +164,7 @@ class ExcellonObject(FlatCAMObj, Excellon):
self.ui.autoload_db_cb.stateChanged.connect(self.on_autoload_db_toggled)
# Editor
self.ui.editor_button.clicked.connect(lambda: self.app.object2editor())
self.ui.editor_button.clicked.connect(lambda: self.app.on_editing_start())
# Properties
self.ui.info_button.toggled.connect(self.on_properties)

View File

@@ -389,7 +389,7 @@ class GeometryObject(FlatCAMObj, Geometry):
self.ui.multicolored_cb.stateChanged.connect(self.on_multicolored_cb_click)
# Editor Signal
self.ui.editor_button.clicked.connect(self.app.object2editor)
self.ui.editor_button.clicked.connect(self.app.on_editing_start)
# Properties
self.ui.info_button.toggled.connect(self.on_properties)
@@ -1060,7 +1060,7 @@ class GeometryObject(FlatCAMObj, Geometry):
endxy = endxy if endxy else self.obj_options["tools_mill_endxy"]
if isinstance(endxy, str):
endxy = re.sub('[()\[\]]', '', endxy)
endxy = re.sub(r'[()\[\]]', '', endxy)
if endxy and endxy != '':
endxy = [float(eval(a)) for a in endxy.split(",")]
@@ -1068,7 +1068,7 @@ class GeometryObject(FlatCAMObj, Geometry):
toolchangexy = toolchangexy if toolchangexy else self.obj_options["tools_mill_toolchangexy"]
if isinstance(toolchangexy, str):
toolchangexy = re.sub('[()\[\]]', '', toolchangexy)
toolchangexy = re.sub(r'[()\[\]]', '', toolchangexy)
if toolchangexy and toolchangexy != '':
toolchangexy = [float(eval(a)) for a in toolchangexy.split(",")]

View File

@@ -156,7 +156,7 @@ class GerberObject(FlatCAMObj, Gerber):
self.ui.multicolored_cb.stateChanged.connect(self.on_multicolored_cb_click)
# Editor
self.ui.editor_button.clicked.connect(lambda: self.app.object2editor())
self.ui.editor_button.clicked.connect(lambda: self.app.on_editing_start())
# Properties
self.ui.info_button.toggled.connect(self.on_properties)