Merge branch 'Beta'

This commit is contained in:
David Robertson
2020-05-03 01:53:27 +01:00
52 changed files with 58356 additions and 48641 deletions

View File

@@ -45,7 +45,7 @@ class PreferencesUIManager:
# if Preferences are changed in the Edit -> Preferences tab the value will be set to True
self.preferences_changed_flag = False
# when adding entries here read the comments in the method found bellow named:
# when adding entries here read the comments in the method found below named:
# def new_object(self, kind, name, initialize, active=True, fit=True, plot=True)
self.defaults_form_fields = {
# General App

View File

@@ -374,10 +374,25 @@ class GeneralAppPrefGroupUI(OptionsGroupUI):
self.splash_cb.stateChanged.connect(self.on_splash_changed)
# Monitor the checkbox from the Application Defaults Tab and show the TCL shell or not depending on it's value
self.shell_startup_cb.clicked.connect(self.app.on_toggle_shell_from_settings)
self.shell_startup_cb.clicked.connect(self.on_toggle_shell_from_settings)
self.language_apply_btn.clicked.connect(lambda: fcTranslate.on_language_apply_click(app=self.app, restart=True))
def on_toggle_shell_from_settings(self, state):
"""
Toggle shell: if is visible close it, if it is closed then open it
:return: None
"""
self.app.defaults.report_usage("on_toggle_shell_from_settings()")
if state is True:
if not self.app.ui.shell_dock.isVisible():
self.app.ui.shell_dock.show()
else:
if self.app.ui.shell_dock.isVisible():
self.app.ui.shell_dock.hide()
@staticmethod
def on_splash_changed(state):
qsettings = QSettings("Open Source", "FlatCAM")

View File

@@ -377,7 +377,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI2):
self.app.connect_toolbar_signals()
self.app.ui.grid_snap_btn.setChecked(True)
self.app.on_grid_snap_triggered(state=True)
self.app.ui.on_grid_snap_triggered(state=True)
self.app.ui.grid_gap_x_entry.setText(str(self.app.defaults["global_gridx"]))
self.app.ui.grid_gap_y_entry.setText(str(self.app.defaults["global_gridy"]))