- most of the logging (except in the Editors) is now done by the AppLogging class
This commit is contained in:
@@ -351,7 +351,7 @@ class ToolCalibration(AppTool):
|
||||
self.ui.top_left_coordy_found.set_value('')
|
||||
|
||||
def gcode_header(self):
|
||||
log.debug("ToolCalibration.gcode_header()")
|
||||
self.app.log.debug("ToolCalibration.gcode_header()")
|
||||
time_str = "{:%A, %d %B %Y at %H:%M}".format(datetime.now())
|
||||
|
||||
gcode = '(G-CODE GENERATED BY FLATCAM v%s - www.flatcam.org - Version Date: %s)\n' % \
|
||||
@@ -634,7 +634,7 @@ class ToolCalibration(AppTool):
|
||||
try:
|
||||
self.cal_object = model_index.internalPointer().obj
|
||||
except Exception as e:
|
||||
log.error("ToolCalibration.on_cal_button_click() --> %s" % str(e))
|
||||
self.app.log.error("ToolCalibration.on_cal_button_click() --> %s" % str(e))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("No object is selected."))
|
||||
return
|
||||
|
||||
@@ -648,7 +648,7 @@ class ToolCalibration(AppTool):
|
||||
origin_x = self.click_points[0][0]
|
||||
origin_y = self.click_points[0][1]
|
||||
except IndexError as e:
|
||||
log.debug("ToolCalibration.new_calibrated_object() --> %s" % str(e))
|
||||
self.app.log.debug("ToolCalibration.new_calibrated_object() --> %s" % str(e))
|
||||
return 'fail'
|
||||
|
||||
scalex = self.ui.scalex_entry.get_value()
|
||||
@@ -700,7 +700,7 @@ class ToolCalibration(AppTool):
|
||||
if obj.tools:
|
||||
obj_init.tools = deepcopy(obj.tools)
|
||||
except Exception as err:
|
||||
log.error("ToolCalibration.new_calibrated_object.initialize_gerber() --> %s" % str(err))
|
||||
self.app.log.error("ToolCalibration.new_calibrated_object.initialize_gerber() --> %s" % str(err))
|
||||
|
||||
obj_init.scale(xfactor=scalex, yfactor=scaley, point=(origin_x, origin_y))
|
||||
obj_init.skew(angle_x=skewx, angle_y=skewy, point=(origin_x, origin_y))
|
||||
@@ -727,7 +727,7 @@ class ToolCalibration(AppTool):
|
||||
|
||||
if obj is None:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("No object is selected."))
|
||||
log.debug("ToolCalibration.new_calibrated_object() --> No object to calibrate")
|
||||
self.app.log.debug("ToolCalibration.new_calibrated_object() --> No object to calibrate")
|
||||
return 'fail'
|
||||
|
||||
try:
|
||||
@@ -738,7 +738,7 @@ class ToolCalibration(AppTool):
|
||||
elif obj.kind.lower() == 'geometry':
|
||||
self.app.app_obj.new_object("geometry", str(obj_name), initialize_geometry)
|
||||
except Exception as e:
|
||||
log.error("ToolCalibration.new_calibrated_object() --> %s" % str(e))
|
||||
self.app.log.error("ToolCalibration.new_calibrated_object() --> %s" % str(e))
|
||||
return "Operation failed: %s" % str(e)
|
||||
|
||||
def disconnect_cal_events(self):
|
||||
|
||||
Reference in New Issue
Block a user