- most of the logging (except in the Editors) is now done by the AppLogging class
This commit is contained in:
@@ -408,7 +408,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
||||
def set_ui(self, ui):
|
||||
FlatCAMObj.set_ui(self, ui)
|
||||
|
||||
log.debug("FlatCAMCNCJob.set_ui()")
|
||||
self.app.log.debug("FlatCAMCNCJob.set_ui()")
|
||||
|
||||
assert isinstance(self.ui, CNCObjectUI), \
|
||||
"Expected a CNCObjectUI, got %s" % type(self.ui)
|
||||
@@ -1403,7 +1403,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
||||
:return:
|
||||
"""
|
||||
|
||||
log.debug("FlatCAMObj.FlatCAMECNCjob.convert_units()")
|
||||
self.app.log.debug("FlatCAMObj.FlatCAMECNCjob.convert_units()")
|
||||
|
||||
factor = CNCjob.convert_units(self, units)
|
||||
self.options["tooldia"] = float(self.options["tooldia"]) * factor
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
# ##########################################################
|
||||
# File modified by: Marius Stanciu #
|
||||
# ##########################################################
|
||||
from PyQt6 import QtGui
|
||||
|
||||
from appEditors.AppTextEditor import AppTextEditor
|
||||
from appObjects.FlatCAMObj import *
|
||||
|
||||
@@ -33,7 +31,7 @@ class DocumentObject(FlatCAMObj):
|
||||
def __init__(self, name):
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
log.debug("Creating a Document object...")
|
||||
self.app.log.debug("Creating a Document object...")
|
||||
FlatCAMObj.__init__(self, name)
|
||||
|
||||
self.kind = "document"
|
||||
@@ -55,7 +53,7 @@ class DocumentObject(FlatCAMObj):
|
||||
|
||||
def set_ui(self, ui):
|
||||
FlatCAMObj.set_ui(self, ui)
|
||||
log.debug("DocumentObject.set_ui()")
|
||||
self.app.log.debug("DocumentObject.set_ui()")
|
||||
|
||||
assert isinstance(self.ui, DocumentObjectUI), \
|
||||
"Expected a DocumentObjectUI, got %s" % type(self.ui)
|
||||
|
||||
@@ -1554,8 +1554,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
self.read_form_item('multicolored')
|
||||
self.plot()
|
||||
|
||||
@staticmethod
|
||||
def merge(geo_list, geo_final, multi_geo=None, fuse_tools=None):
|
||||
def merge(self, geo_list, geo_final, multi_geo=None, fuse_tools=None):
|
||||
"""
|
||||
Merges the geometry of objects in grb_list into the geometry of geo_final.
|
||||
|
||||
@@ -1580,7 +1579,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
try:
|
||||
new_options[option] = deepcopy(geo_obj.options[option])
|
||||
except Exception as e:
|
||||
log.error("Failed to copy option %s. Error: %s" % (str(option), str(e)))
|
||||
self.app.log.error("Failed to copy option %s. Error: %s" % (str(option), str(e)))
|
||||
|
||||
# Expand lists
|
||||
if type(geo_obj) is list:
|
||||
@@ -1596,7 +1595,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
new_solid_geometry += deepcopy(geo_obj.solid_geometry.geoms)
|
||||
except Exception as e:
|
||||
new_solid_geometry.append(geo_obj.solid_geometry)
|
||||
log.error("GeometryObject.merge() --> %s" % str(e))
|
||||
self.app.log.error("GeometryObject.merge() --> %s" % str(e))
|
||||
|
||||
# find the tool_uid maximum value in the geo_final
|
||||
try:
|
||||
|
||||
@@ -33,7 +33,7 @@ class ScriptObject(FlatCAMObj):
|
||||
def __init__(self, name):
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
log.debug("Creating a ScriptObject object...")
|
||||
self.app.log.debug("Creating a ScriptObject object...")
|
||||
FlatCAMObj.__init__(self, name)
|
||||
|
||||
self.kind = "script"
|
||||
@@ -62,7 +62,7 @@ class ScriptObject(FlatCAMObj):
|
||||
:return:
|
||||
"""
|
||||
FlatCAMObj.set_ui(self, ui)
|
||||
log.debug("ScriptObject.set_ui()")
|
||||
self.app.log.debug("ScriptObject.set_ui()")
|
||||
|
||||
assert isinstance(self.ui, ScriptObjectUI), \
|
||||
"Expected a ScriptObjectUI, got %s" % type(self.ui)
|
||||
@@ -135,7 +135,7 @@ class ScriptObject(FlatCAMObj):
|
||||
# self.script_editor_tab.code_editor.setPlainText(self.source_file)
|
||||
self.script_editor_tab.load_text(self.source_file, move_to_end=True)
|
||||
except Exception as e:
|
||||
log.error("ScriptObject.set_ui() --> %s" % str(e))
|
||||
self.app.log.error("ScriptObject.set_ui() --> %s" % str(e))
|
||||
|
||||
self.script_editor_tab.t_frame.show()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user