- application wide change: introduced the precision parameters in Edit -> Preferences who will control how many decimals to use in the app parameters
This commit is contained in:
@@ -30,7 +30,7 @@ class ToolCalculator(FlatCAMTool):
|
||||
FlatCAMTool.__init__(self, app)
|
||||
|
||||
self.app = app
|
||||
self.decimals = 6
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
# ## Title
|
||||
title_label = QtWidgets.QLabel("%s" % self.toolName)
|
||||
|
||||
@@ -38,7 +38,7 @@ class ToolCalibrateExcellon(FlatCAMTool):
|
||||
self.app = app
|
||||
self.canvas = self.app.plotcanvas
|
||||
|
||||
self.decimals = 4
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
# ## Title
|
||||
title_label = QtWidgets.QLabel("%s" % self.toolName)
|
||||
|
||||
@@ -45,7 +45,7 @@ class ToolCopperThieving(FlatCAMTool):
|
||||
self.app = app
|
||||
self.canvas = self.app.plotcanvas
|
||||
|
||||
self.decimals = 4
|
||||
self.decimals = self.app.decimals
|
||||
self.units = self.app.defaults['units']
|
||||
|
||||
# ## Title
|
||||
|
||||
@@ -46,7 +46,7 @@ class CutOut(FlatCAMTool):
|
||||
|
||||
self.app = app
|
||||
self.canvas = app.plotcanvas
|
||||
self.decimals = 4
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
# Title
|
||||
title_label = QtWidgets.QLabel("%s" % self.toolName)
|
||||
|
||||
@@ -26,7 +26,7 @@ class DblSidedTool(FlatCAMTool):
|
||||
|
||||
def __init__(self, app):
|
||||
FlatCAMTool.__init__(self, app)
|
||||
self.decimals = 4
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
# ## Title
|
||||
title_label = QtWidgets.QLabel("%s" % self.toolName)
|
||||
|
||||
@@ -33,6 +33,8 @@ class Distance(FlatCAMTool):
|
||||
FlatCAMTool.__init__(self, app)
|
||||
|
||||
self.app = app
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
self.canvas = self.app.plotcanvas
|
||||
self.units = self.app.defaults['units'].lower()
|
||||
|
||||
@@ -135,8 +137,6 @@ class Distance(FlatCAMTool):
|
||||
self.mm = None
|
||||
self.mr = None
|
||||
|
||||
self.decimals = 4
|
||||
|
||||
# VisPy visuals
|
||||
if self.app.is_legacy is False:
|
||||
self.sel_shapes = ShapeCollection(parent=self.app.plotcanvas.view.scene, layers=1)
|
||||
|
||||
@@ -36,6 +36,7 @@ class DistanceMin(FlatCAMTool):
|
||||
self.app = app
|
||||
self.canvas = self.app.plotcanvas
|
||||
self.units = self.app.defaults['units'].lower()
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
# ## Title
|
||||
title_label = QtWidgets.QLabel("<font size=4><b>%s</b></font><br>" % self.toolName)
|
||||
@@ -137,7 +138,6 @@ class DistanceMin(FlatCAMTool):
|
||||
|
||||
self.layout.addStretch()
|
||||
|
||||
self.decimals = 4
|
||||
self.h_point = (0, 0)
|
||||
|
||||
self.measure_btn.clicked.connect(self.activate_measure_tool)
|
||||
|
||||
@@ -38,7 +38,7 @@ class ToolFiducials(FlatCAMTool):
|
||||
self.app = app
|
||||
self.canvas = self.app.plotcanvas
|
||||
|
||||
self.decimals = 4
|
||||
self.decimals = self.app.decimals
|
||||
self.units = ''
|
||||
|
||||
# ## Title
|
||||
|
||||
@@ -44,7 +44,7 @@ class Film(FlatCAMTool):
|
||||
def __init__(self, app):
|
||||
FlatCAMTool.__init__(self, app)
|
||||
|
||||
self.decimals = 4
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
# Title
|
||||
title_label = QtWidgets.QLabel("%s" % self.toolName)
|
||||
|
||||
@@ -26,6 +26,9 @@ class ToolImage(FlatCAMTool):
|
||||
def __init__(self, app):
|
||||
FlatCAMTool.__init__(self, app)
|
||||
|
||||
self.app = app
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
# Title
|
||||
title_label = QtWidgets.QLabel("%s" % _('Image to PCB'))
|
||||
title_label.setStyleSheet("""
|
||||
|
||||
@@ -30,6 +30,8 @@ class ToolMove(FlatCAMTool):
|
||||
|
||||
def __init__(self, app):
|
||||
FlatCAMTool.__init__(self, app)
|
||||
self.app = app
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
self.layout.setContentsMargins(0, 0, 3, 0)
|
||||
self.setSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Maximum)
|
||||
|
||||
@@ -39,7 +39,7 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
||||
|
||||
def __init__(self, app):
|
||||
self.app = app
|
||||
self.decimals = 4
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
FlatCAMTool.__init__(self, app)
|
||||
Gerber.__init__(self, steps_per_circle=self.app.defaults["gerber_circle_steps"])
|
||||
|
||||
@@ -40,7 +40,7 @@ class ToolOptimal(FlatCAMTool):
|
||||
FlatCAMTool.__init__(self, app)
|
||||
|
||||
self.units = self.app.defaults['units'].upper()
|
||||
self.decimals = 4
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
# ############################################################################
|
||||
# ############################ GUI creation ##################################
|
||||
|
||||
@@ -44,6 +44,7 @@ class ToolPDF(FlatCAMTool):
|
||||
def __init__(self, app):
|
||||
FlatCAMTool.__init__(self, app)
|
||||
self.app = app
|
||||
self.decimals = self.app.decimals
|
||||
self.step_per_circles = self.app.defaults["gerber_circle_steps"]
|
||||
|
||||
self.stream_re = re.compile(b'.*?FlateDecode.*?stream(.*?)endstream', re.S)
|
||||
|
||||
@@ -42,7 +42,7 @@ class ToolPaint(FlatCAMTool, Gerber):
|
||||
|
||||
def __init__(self, app):
|
||||
self.app = app
|
||||
self.decimals = 4
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
FlatCAMTool.__init__(self, app)
|
||||
Geometry.__init__(self, geo_steps_per_circle=self.app.defaults["geometry_circle_steps"])
|
||||
|
||||
@@ -34,8 +34,9 @@ class Panelize(FlatCAMTool):
|
||||
toolName = _("Panelize PCB")
|
||||
|
||||
def __init__(self, app):
|
||||
super(Panelize, self).__init__(self)
|
||||
self.app = app
|
||||
self.decimals = app.decimals
|
||||
|
||||
FlatCAMTool.__init__(self, app)
|
||||
|
||||
# ## Title
|
||||
title_label = QtWidgets.QLabel("%s" % self.toolName)
|
||||
|
||||
@@ -34,6 +34,7 @@ class PcbWizard(FlatCAMTool):
|
||||
FlatCAMTool.__init__(self, app)
|
||||
|
||||
self.app = app
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
# Title
|
||||
title_label = QtWidgets.QLabel("%s" % _('Import 2-file Excellon'))
|
||||
|
||||
@@ -34,7 +34,7 @@ class Properties(FlatCAMTool):
|
||||
|
||||
self.setSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Ignored)
|
||||
|
||||
self.decimals = 4
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
# this way I can hide/show the frame
|
||||
self.properties_frame = QtWidgets.QFrame()
|
||||
|
||||
@@ -48,7 +48,7 @@ class QRCode(FlatCAMTool):
|
||||
self.app = app
|
||||
self.canvas = self.app.plotcanvas
|
||||
|
||||
self.decimals = 4
|
||||
self.decimals = self.app.decimals
|
||||
self.units = ''
|
||||
|
||||
# ## Title
|
||||
|
||||
@@ -35,9 +35,9 @@ class RulesCheck(FlatCAMTool):
|
||||
tool_finished = QtCore.pyqtSignal(list)
|
||||
|
||||
def __init__(self, app):
|
||||
super(RulesCheck, self).__init__(self)
|
||||
self.app = app
|
||||
self.decimals = 4
|
||||
self.decimals = app.decimals
|
||||
|
||||
FlatCAMTool.__init__(self, app)
|
||||
|
||||
# ## Title
|
||||
title_label = QtWidgets.QLabel("%s" % self.toolName)
|
||||
|
||||
@@ -40,7 +40,7 @@ class SolderPaste(FlatCAMTool):
|
||||
FlatCAMTool.__init__(self, app)
|
||||
|
||||
# Number of decimals to be used for tools/nozzles in this FlatCAM Tool
|
||||
self.decimals = 4
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
# ## Title
|
||||
title_label = QtWidgets.QLabel("%s" % self.toolName)
|
||||
|
||||
@@ -36,6 +36,7 @@ class ToolSub(FlatCAMTool):
|
||||
|
||||
def __init__(self, app):
|
||||
self.app = app
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
FlatCAMTool.__init__(self, app)
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ class ToolTransform(FlatCAMTool):
|
||||
|
||||
def __init__(self, app):
|
||||
FlatCAMTool.__init__(self, app)
|
||||
self.decimals = 4
|
||||
self.decimals = self.app.decimals
|
||||
|
||||
self.transform_lay = QtWidgets.QVBoxLayout()
|
||||
self.layout.addLayout(self.transform_lay)
|
||||
|
||||
Reference in New Issue
Block a user