- made units change from shortcut key 'Q' not to affect the preferences

This commit is contained in:
Marius Stanciu
2019-05-06 03:58:11 +03:00
parent ed58acdac5
commit 7c334d7606
3 changed files with 13 additions and 8 deletions

View File

@@ -3521,7 +3521,7 @@ class App(QtCore.QObject):
def set_screen_units(self, units): def set_screen_units(self, units):
self.ui.units_label.setText("[" + self.defaults["units"].lower() + "]") self.ui.units_label.setText("[" + self.defaults["units"].lower() + "]")
def on_toggle_units(self): def on_toggle_units(self, no_pref=False):
""" """
Callback for the Units radio-button change in the Options tab. Callback for the Units radio-button change in the Options tab.
Changes the application's default units or the current project's units. Changes the application's default units or the current project's units.
@@ -3659,13 +3659,14 @@ class App(QtCore.QObject):
response = msgbox.clickedButton() response = msgbox.clickedButton()
if response == bt_ok: if response == bt_ok:
self.options_read_form() if no_pref is False:
scale_options(factor) self.options_read_form()
self.options_write_form() scale_options(factor)
self.options_write_form()
self.defaults_read_form() self.defaults_read_form()
scale_defaults(factor) scale_defaults(factor)
self.defaults_write_form() self.defaults_write_form()
self.should_we_save = True self.should_we_save = True

View File

@@ -9,6 +9,10 @@ CAD program, and create G-Code for Isolation routing.
================================================= =================================================
6.05.2019
- made units change from shortcut key 'Q' not to affect the preferences
5.05.2019 5.05.2019
- another fix for bug in clear geometry processing for Gerber apertures - another fix for bug in clear geometry processing for Gerber apertures

View File

@@ -2290,7 +2290,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
self.app.ui.general_defaults_form.general_app_group.units_radio.set_value("IN") self.app.ui.general_defaults_form.general_app_group.units_radio.set_value("IN")
else: else:
self.app.ui.general_defaults_form.general_app_group.units_radio.set_value("MM") self.app.ui.general_defaults_form.general_app_group.units_radio.set_value("MM")
self.app.on_toggle_units() self.app.on_toggle_units(no_pref=True)
# Rotate Object by 90 degree CW # Rotate Object by 90 degree CW
if key == QtCore.Qt.Key_R: if key == QtCore.Qt.Key_R: