- made sure that the units are read from the self.defaults and not from the GUI

- added Robber Bar option to Copper Thieving Tool
This commit is contained in:
Marius Stanciu
2019-11-24 00:31:41 +02:00
committed by Marius
parent 8c4663f344
commit d03428f860
26 changed files with 279 additions and 90 deletions

View File

@@ -2150,7 +2150,7 @@ class FlatCAMExcEditor(QtCore.QObject):
def set_ui(self):
# updated units
self.units = self.app.ui.general_defaults_form.general_app_group.units_radio.get_value().upper()
self.units = self.app.defaults['units'].upper()
if self.units == "IN":
self.decimals = 4
@@ -2249,7 +2249,7 @@ class FlatCAMExcEditor(QtCore.QObject):
pass
# updated units
self.units = self.app.ui.general_defaults_form.general_app_group.units_radio.get_value().upper()
self.units = self.app.defaults['units'].upper()
# make a new name for the new Excellon object (the one with edited content)
self.edited_obj_name = self.exc_obj.options['name']

View File

@@ -367,7 +367,7 @@ class TextInputTool(FlatCAMTool):
font_name=self.font_name,
font_size=font_to_geo_size,
font_type=font_to_geo_type,
units=self.app.ui.general_defaults_form.general_app_group.units_radio.get_value().upper())
units=self.app.defaults['units'].upper())
def font_family(self, font):
self.text_input_entry.selectAll()
@@ -1513,7 +1513,7 @@ class TransformEditorTool(FlatCAMTool):
_("Geometry shape rotate cancelled"))
def on_offx_key(self):
units = self.app.ui.general_defaults_form.general_app_group.units_radio.get_value().lower()
units = self.app.defaults['units'].lower()
val_box = FCInputDialog(title=_("Offset on X axis ..."),
text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
@@ -1532,7 +1532,7 @@ class TransformEditorTool(FlatCAMTool):
_("Geometry shape offset X cancelled"))
def on_offy_key(self):
units = self.app.ui.general_defaults_form.general_app_group.units_radio.get_value().lower()
units = self.app.defaults['units'].lower()
val_box = FCInputDialog(title=_("Offset on Y axis ..."),
text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
@@ -3165,7 +3165,7 @@ class FlatCAMGeoEditor(QtCore.QObject):
except ValueError:
return
units = self.app.ui.general_defaults_form.general_app_group.units_radio.get_value().upper()
units = self.app.defaults['units'].upper()
dec = 6 if units == 'IN' else 4
if self.app.ui.grid_gap_link_cb.isChecked():
self.app.ui.grid_gap_y_entry.set_value(val, decimals=dec)
@@ -3644,7 +3644,7 @@ class FlatCAMGeoEditor(QtCore.QObject):
self.replot()
# updated units
self.units = self.app.ui.general_defaults_form.general_app_group.units_radio.get_value().upper()
self.units = self.app.defaults['units'].upper()
if self.units == "IN":
self.decimals = 4

View File

@@ -3081,7 +3081,7 @@ class FlatCAMGrbEditor(QtCore.QObject):
pass
# updated units
self.units = self.app.ui.general_defaults_form.general_app_group.units_radio.get_value().upper()
self.units = self.app.defaults['units'].upper()
# make a new name for the new Excellon object (the one with edited content)
self.edited_obj_name = self.gerber_obj.options['name']
@@ -4883,7 +4883,7 @@ class FlatCAMGrbEditor(QtCore.QObject):
# clear previous marking
self.ma_annotation.clear(update=True)
self.units = self.app.ui.general_defaults_form.general_app_group.units_radio.get_value().upper()
self.units = self.app.defaults['units'].upper()
text = []
position = []
@@ -5976,7 +5976,7 @@ class TransformEditorTool(FlatCAMTool):
_("Geometry shape rotate cancelled"))
def on_offx_key(self):
units = self.app.ui.general_defaults_form.general_app_group.units_radio.get_value().lower()
units = self.app.defaults['units'].lower()
val_box = FCInputDialog(title=_("Offset on X axis ..."),
text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
@@ -5995,7 +5995,7 @@ class TransformEditorTool(FlatCAMTool):
_("Geometry shape offset X cancelled"))
def on_offy_key(self):
units = self.app.ui.general_defaults_form.general_app_group.units_radio.get_value().lower()
units = self.app.defaults['units'].lower()
val_box = FCInputDialog(title=_("Offset on Y axis ..."),
text='%s: (%s)' % (_('Enter a distance Value'), str(units)),