- major change: from now on the only dimensional units available are those from ISO METRIC system
This commit is contained in:
@@ -491,9 +491,6 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
|
||||
# Separator
|
||||
self.menuedit.addSeparator()
|
||||
self.menuedittoggleunits = self.menuedit.addAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/toggle_units16.png'),
|
||||
'%s\t%s' % (_('Toggle Units'), _('Q')))
|
||||
self.menueditselectall = self.menuedit.addAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/select_all.png'),
|
||||
'%s\t%s' % (_('Select All'), _('Ctrl+A')))
|
||||
@@ -1981,7 +1978,7 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
self.status_toolbar.setVisible(self.app.defaults["global_statusbar_show"])
|
||||
|
||||
self.units_label = FCLabel("[mm]")
|
||||
self.units_label.setToolTip(_("Application units"))
|
||||
self.units_label.setToolTip(_("The application dimensional units is millimeter."))
|
||||
self.units_label.setMargin(2)
|
||||
self.infobar.addWidget(self.units_label)
|
||||
|
||||
@@ -3372,12 +3369,7 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
|
||||
# Change Units
|
||||
if key == QtCore.Qt.Key.Key_Q:
|
||||
# if self.app.app_units == 'MM':
|
||||
# self.app.ui.general_pref_form.general_app_group.units_radio.set_value("IN")
|
||||
# else:
|
||||
# self.app.ui.general_pref_form.general_app_group.units_radio.set_value("MM")
|
||||
# self.app.on_toggle_units(no_pref=True)
|
||||
self.app.on_toggle_units_click()
|
||||
pass
|
||||
|
||||
# Rotate Object by 90 degree CW
|
||||
if key == QtCore.Qt.Key.Key_R:
|
||||
@@ -3960,7 +3952,6 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
# Add Track
|
||||
if key == QtCore.Qt.Key.Key_T or key == 'T':
|
||||
self.app.grb_editor.launched_from_shortcuts = True
|
||||
# ## Current application units in Upper Case
|
||||
self.app.grb_editor.select_tool('track')
|
||||
return
|
||||
|
||||
@@ -4230,7 +4221,7 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
if key == QtCore.Qt.Key.Key_T or key == 'T':
|
||||
self.app.exc_editor.launched_from_shortcuts = True
|
||||
# ## Current application units in Upper Case
|
||||
self.units = self.general_pref_form.general_app_group.units_radio.get_value().upper()
|
||||
self.units = "MM"
|
||||
tool_add_popup = FCInputDoubleSpinner(title='%s ...' % _("New Tool"),
|
||||
text='%s:' % _('Enter a Tool Diameter'),
|
||||
min=0.0000, max=99.9999, decimals=self.decimals)
|
||||
|
||||
@@ -55,9 +55,7 @@ class PreferencesUIManager(QtCore.QObject):
|
||||
# def app_obj.new_object(self, kind, name, initialize, active=True, fit=True, plot=True)
|
||||
self.defaults_form_fields = {
|
||||
# General App
|
||||
"decimals_inch": self.ui.general_pref_form.general_app_group.precision_inch_entry,
|
||||
"decimals_metric": self.ui.general_pref_form.general_app_group.precision_metric_entry,
|
||||
"units": self.ui.general_pref_form.general_app_group.units_radio,
|
||||
"global_graphic_engine": self.ui.general_pref_form.general_app_group.ge_radio,
|
||||
"global_graphic_engine_3d_no_mp": self.ui.general_pref_form.general_app_group.ge_comp_cb,
|
||||
"global_app_level": self.ui.general_pref_form.general_app_group.app_level_radio,
|
||||
|
||||
@@ -30,9 +30,7 @@ class GeneralAppPrefGroupUI(OptionsGroupUI):
|
||||
# Grid0 Frame
|
||||
# #############################################################################################################
|
||||
self.unitslabel = FCLabel('%s' % _("Units"), color='red', bold=True)
|
||||
self.unitslabel.setToolTip(_("The default value for the application units.\n"
|
||||
"Whatever is selected here is set every time\n"
|
||||
"the application is started."))
|
||||
self.unitslabel.setToolTip(_("The application dimensional units is millimeter."))
|
||||
self.layout.addWidget(self.unitslabel)
|
||||
|
||||
grid0_frame = FCFrame()
|
||||
@@ -41,19 +39,10 @@ class GeneralAppPrefGroupUI(OptionsGroupUI):
|
||||
grid0 = GLay(v_spacing=5, h_spacing=3)
|
||||
grid0_frame.setLayout(grid0)
|
||||
|
||||
# Units for FlatCAM
|
||||
self.units_radio = RadioSetDefaults(
|
||||
choices=[{'label': _('mm'), 'value': 'MM'}, {'label': _('inch'), 'value': 'IN'}],
|
||||
compact=True
|
||||
)
|
||||
|
||||
grid0.addWidget(self.units_radio, 0, 0, 1, 2)
|
||||
|
||||
# Precision Metric
|
||||
self.precision_metric_label = FCLabel('%s:' % _('Precision MM'))
|
||||
self.precision_metric_label = FCLabel('%s:' % _('Dim. Precision'))
|
||||
self.precision_metric_label.setToolTip(
|
||||
_("The number of decimals used throughout the application\n"
|
||||
"when the set units are in METRIC system.\n"
|
||||
_("The number of decimals used throughout the application.\n"
|
||||
"Any change here require an application restart.")
|
||||
)
|
||||
self.precision_metric_entry = FCSpinner()
|
||||
@@ -63,20 +52,6 @@ class GeneralAppPrefGroupUI(OptionsGroupUI):
|
||||
grid0.addWidget(self.precision_metric_label, 2, 0)
|
||||
grid0.addWidget(self.precision_metric_entry, 2, 1)
|
||||
|
||||
# Precision Inch
|
||||
self.precision_inch_label = FCLabel('%s:' % _('Precision Inch'))
|
||||
self.precision_inch_label.setToolTip(
|
||||
_("The number of decimals used throughout the application\n"
|
||||
"when the set units are in INCH system.\n"
|
||||
"Any change here require an application restart.")
|
||||
)
|
||||
self.precision_inch_entry = FCSpinner()
|
||||
self.precision_inch_entry.set_range(2, 16)
|
||||
self.precision_inch_entry.setWrapping(True)
|
||||
|
||||
grid0.addWidget(self.precision_inch_label, 4, 0)
|
||||
grid0.addWidget(self.precision_inch_entry, 4, 1)
|
||||
|
||||
self.par_label = FCLabel('%s' % _("Parameters"), color='blue', bold=True)
|
||||
self.layout.addWidget(self.par_label)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user