- moved all the new_object related methods in their own class AppObjects.AppObject

This commit is contained in:
Marius Stanciu
2020-05-18 17:31:02 +03:00
committed by Marius
parent 710a84b442
commit 2bcdeff7ef
55 changed files with 579 additions and 554 deletions

View File

@@ -2239,7 +2239,7 @@ class FlatCAMExcEditor(QtCore.QObject):
# store the status of the editor so the Delete at object level will not work until the edit is finished
self.editor_active = False
log.debug("Initialization of the FlatCAM Excellon Editor is finished ...")
log.debug("Initialization of the Excellon Editor is finished ...")
def pool_recreated(self, pool):
self.shapes.pool = pool
@@ -3336,7 +3336,7 @@ class FlatCAMExcEditor(QtCore.QObject):
with self.app.proc_container.new(_("Creating Excellon.")):
try:
edited_obj = self.app.new_object("excellon", outname, obj_init)
edited_obj = self.app.app_obj.new_object("excellon", outname, obj_init)
edited_obj.source_file = self.app.export_excellon(obj_name=edited_obj.options['name'],
local_use=edited_obj,
filename=None,

View File

@@ -3552,7 +3552,7 @@ class FlatCAMGeoEditor(QtCore.QObject):
# store the status of the editor so the Delete at object level will not work until the edit is finished
self.editor_active = False
log.debug("Initialization of the FlatCAM Geometry Editor is finished ...")
log.debug("Initialization of the Geometry Editor is finished ...")
def pool_recreated(self, pool):
self.shapes.pool = pool

View File

@@ -3110,7 +3110,7 @@ class FlatCAMGrbEditor(QtCore.QObject):
self.complete = True
self.set_ui()
log.debug("Initialization of the FlatCAM Gerber Editor is finished ...")
log.debug("Initialization of the Gerber Editor is finished ...")
def pool_recreated(self, pool):
self.shapes.pool = pool
@@ -4346,7 +4346,7 @@ class FlatCAMGrbEditor(QtCore.QObject):
with self.app.proc_container.new(_("Creating Gerber.")):
try:
self.app.new_object("gerber", outname, obj_init)
self.app.app_obj.new_object("gerber", outname, obj_init)
except Exception as e:
log.error("Error on Edited object creation: %s" % str(e))
# make sure to clean the previous results