- modified Toggle Workspace function to work in the new Preferences UI configuration
- cleaned the app from progress signal usage since it is not used anymore
This commit is contained in:
@@ -484,11 +484,8 @@ class Panelize(FlatCAMTool):
|
||||
if panel_obj is not None:
|
||||
self.app.inform.emit(_("Generating panel ... "))
|
||||
|
||||
self.app.progress.emit(0)
|
||||
|
||||
def job_init_excellon(obj_fin, app_obj):
|
||||
currenty = 0.0
|
||||
self.app.progress.emit(10)
|
||||
obj_fin.tools = copied_tools
|
||||
obj_fin.drills = []
|
||||
obj_fin.slots = []
|
||||
|
||||
@@ -417,8 +417,6 @@ class PcbWizard(FlatCAMTool):
|
||||
|
||||
# How the object should be initialized
|
||||
def obj_init(excellon_obj, app_obj):
|
||||
# self.progress.emit(20)
|
||||
|
||||
try:
|
||||
ret = excellon_obj.parse_file(file_obj=excellon_fileobj)
|
||||
if ret == "fail":
|
||||
@@ -427,10 +425,8 @@ class PcbWizard(FlatCAMTool):
|
||||
_("This is not Excellon file."))
|
||||
return "fail"
|
||||
except IOError:
|
||||
app_obj.inform.emit('[ERROR_NOTCL] %s: %s' % (
|
||||
_("Cannot parse file"), self.outname))
|
||||
app_obj.inform.emit('[ERROR_NOTCL] %s: %s' % (_("Cannot parse file"), self.outname))
|
||||
app_obj.log.debug("Could not import Excellon object.")
|
||||
app_obj.progress.emit(0)
|
||||
return "fail"
|
||||
except Exception as e:
|
||||
app_obj.log.debug("PcbWizard.on_import_excellon().obj_init() %s" % str(e))
|
||||
@@ -443,7 +439,7 @@ class PcbWizard(FlatCAMTool):
|
||||
if ret == 'fail':
|
||||
app_obj.log.debug("Could not create geometry for Excellon object.")
|
||||
return "fail"
|
||||
app_obj.progress.emit(100)
|
||||
|
||||
for tool in excellon_obj.tools:
|
||||
if excellon_obj.tools[tool]['solid_geometry']:
|
||||
return
|
||||
|
||||
@@ -1348,8 +1348,6 @@ class SolderPaste(FlatCAMTool):
|
||||
job_obj.options['ymax'] = ymax
|
||||
|
||||
for tooluid_key, tooluid_value in obj.tools.items():
|
||||
app_obj.progress.emit(20)
|
||||
|
||||
# find the tool_dia associated with the tooluid_key
|
||||
tool_dia = tooluid_value['tooldia']
|
||||
tool_cnc_dict = deepcopy(tooluid_value)
|
||||
@@ -1380,8 +1378,6 @@ class SolderPaste(FlatCAMTool):
|
||||
# tell gcode_parse from which point to start drawing the lines depending on what kind of
|
||||
# object is the source of gcode
|
||||
job_obj.toolchange_xy_type = "geometry"
|
||||
app_obj.progress.emit(80)
|
||||
|
||||
job_obj.cnc_tools.update({
|
||||
tooluid_key: deepcopy(tool_cnc_dict)
|
||||
})
|
||||
@@ -1394,8 +1390,6 @@ class SolderPaste(FlatCAMTool):
|
||||
if app_obj.new_object("cncjob", name, job_init) != 'fail':
|
||||
app_obj.inform.emit('[success] [success] %s: %s' %
|
||||
(_("ToolSolderPaste CNCjob created"), name))
|
||||
app_obj.progress.emit(100)
|
||||
|
||||
# Create a promise with the name
|
||||
self.app.collection.promise(name)
|
||||
# Send to worker
|
||||
|
||||
@@ -682,8 +682,6 @@ class ToolTransform(FlatCAMTool):
|
||||
xmaximal = max(xmaxlist)
|
||||
ymaximal = max(ymaxlist)
|
||||
|
||||
self.app.progress.emit(20)
|
||||
|
||||
px = 0.5 * (xminimal + xmaximal)
|
||||
py = 0.5 * (yminimal + ymaximal)
|
||||
for sel_obj in obj_list:
|
||||
@@ -697,8 +695,6 @@ class ToolTransform(FlatCAMTool):
|
||||
sel_obj.options['rotate'] = num
|
||||
sel_obj.plot()
|
||||
self.app.inform.emit('[success] %s...' % _('Rotate done'))
|
||||
self.app.progress.emit(100)
|
||||
|
||||
except Exception as e:
|
||||
self.app.inform.emit('[ERROR_NOTCL] %s %s, %s.' %
|
||||
(_("Due of"), str(e), _("action was not executed.")))
|
||||
@@ -743,8 +739,6 @@ class ToolTransform(FlatCAMTool):
|
||||
px = 0.5 * (xminimal + xmaximal)
|
||||
py = 0.5 * (yminimal + ymaximal)
|
||||
|
||||
self.app.progress.emit(20)
|
||||
|
||||
# execute mirroring
|
||||
for sel_obj in obj_list:
|
||||
if isinstance(sel_obj, FlatCAMCNCjob):
|
||||
@@ -768,12 +762,9 @@ class ToolTransform(FlatCAMTool):
|
||||
sel_obj.options['mirror_x'] = not sel_obj.options['mirror_x']
|
||||
else:
|
||||
sel_obj.options['mirror_x'] = True
|
||||
self.app.inform.emit('[success] %s...' %
|
||||
_('Flip on the X axis done'))
|
||||
self.app.inform.emit('[success] %s...' % _('Flip on the X axis done'))
|
||||
self.app.object_changed.emit(sel_obj)
|
||||
sel_obj.plot()
|
||||
self.app.progress.emit(100)
|
||||
|
||||
except Exception as e:
|
||||
self.app.inform.emit('[ERROR_NOTCL] %s %s, %s.' %
|
||||
(_("Due of"), str(e), _("action was not executed.")))
|
||||
@@ -809,8 +800,6 @@ class ToolTransform(FlatCAMTool):
|
||||
xminimal = min(xminlist)
|
||||
yminimal = min(yminlist)
|
||||
|
||||
self.app.progress.emit(20)
|
||||
|
||||
for sel_obj in obj_list:
|
||||
if isinstance(sel_obj, FlatCAMCNCjob):
|
||||
self.app.inform.emit(_("CNCJob objects can't be skewed."))
|
||||
@@ -825,10 +814,7 @@ class ToolTransform(FlatCAMTool):
|
||||
sel_obj.options['skew_y'] = num
|
||||
self.app.object_changed.emit(sel_obj)
|
||||
sel_obj.plot()
|
||||
self.app.inform.emit('[success] %s %s %s...' %
|
||||
(_('Skew on the'), str(axis), _("axis done")))
|
||||
self.app.progress.emit(100)
|
||||
|
||||
self.app.inform.emit('[success] %s %s %s...' % (_('Skew on the'), str(axis), _("axis done")))
|
||||
except Exception as e:
|
||||
self.app.inform.emit('[ERROR_NOTCL] %s %s, %s.' %
|
||||
(_("Due of"), str(e), _("action was not executed.")))
|
||||
@@ -865,8 +851,6 @@ class ToolTransform(FlatCAMTool):
|
||||
xmaximal = max(xmaxlist)
|
||||
ymaximal = max(ymaxlist)
|
||||
|
||||
self.app.progress.emit(20)
|
||||
|
||||
if point is None:
|
||||
px = 0.5 * (xminimal + xmaximal)
|
||||
py = 0.5 * (yminimal + ymaximal)
|
||||
@@ -887,7 +871,6 @@ class ToolTransform(FlatCAMTool):
|
||||
|
||||
self.app.inform.emit('[success] %s %s %s...' %
|
||||
(_('Scale on the'), str(axis), _('axis done')))
|
||||
self.app.progress.emit(100)
|
||||
except Exception as e:
|
||||
self.app.inform.emit('[ERROR_NOTCL] %s %s, %s.' %
|
||||
(_("Due of"), str(e), _("action was not executed.")))
|
||||
@@ -903,8 +886,6 @@ class ToolTransform(FlatCAMTool):
|
||||
else:
|
||||
with self.app.proc_container.new(_("Applying Offset")):
|
||||
try:
|
||||
self.app.progress.emit(20)
|
||||
|
||||
for sel_obj in obj_list:
|
||||
if isinstance(sel_obj, FlatCAMCNCjob):
|
||||
self.app.inform.emit(_("CNCJob objects can't be offset."))
|
||||
@@ -922,8 +903,6 @@ class ToolTransform(FlatCAMTool):
|
||||
|
||||
self.app.inform.emit('[success] %s %s %s...' %
|
||||
(_('Offset on the'), str(axis), _('axis done')))
|
||||
self.app.progress.emit(100)
|
||||
|
||||
except Exception as e:
|
||||
self.app.inform.emit('[ERROR_NOTCL] %s %s, %s.' %
|
||||
(_("Due of"), str(e), _("action was not executed.")))
|
||||
|
||||
Reference in New Issue
Block a user