- fixed an issue due of recent changes that made the application think that is run always for the first time; fixed not applying the selected language translation
- some more code is refactored in the Preferences - the axis will now be drawn on the canvas as they were left in the previous run (just like the HUD and the Workspace) - for processors with less than 4 cores now the default number of workers is 1 (changed from 2) - some graphical settings go now directly to the defaults dictionary and will not pass through the `options` app dictionary
This commit is contained in:
@@ -14,13 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class AutoCompletePrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Gerber File associations Preferences", parent=None)
|
||||
super().__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Autocompleter Keywords")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
self.restore_btn = FCButton(_("Restore"))
|
||||
self.restore_btn.setToolTip(_("Restore the autocompleter keywords list to the default state."))
|
||||
|
||||
@@ -14,13 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class FAExcPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Excellon File associations Preferences", parent=None)
|
||||
super().__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Excellon File associations")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
self.layout.setContentsMargins(2, 2, 2, 2)
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from PyQt6 import QtWidgets, QtGui
|
||||
from PyQt6.QtCore import QSettings
|
||||
|
||||
import appGUI.preferences.OptionsGroupUI
|
||||
from appGUI.GUIElements import FCButton, FCTextArea, FCEntry, FCLabel
|
||||
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
||||
|
||||
@@ -14,13 +15,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class FAGcoPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Gcode File associations Preferences", parent=None)
|
||||
super(FAGcoPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("GCode File associations")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
self.restore_btn = FCButton(_("Restore"))
|
||||
self.restore_btn.setToolTip(_("Restore the extension list to the default state."))
|
||||
|
||||
@@ -14,13 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class FAGrbPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Gerber File associations Preferences", parent=None)
|
||||
super(FAGrbPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Gerber File associations")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
self.restore_btn = FCButton(_("Restore"))
|
||||
self.restore_btn.setToolTip(_("Restore the extension list to the default state."))
|
||||
|
||||
@@ -9,23 +9,21 @@ from appGUI.preferences.utilities.FAExcPrefGroupUI import FAExcPrefGroupUI
|
||||
|
||||
class UtilPreferencesUI(QtWidgets.QWidget):
|
||||
|
||||
def __init__(self, defaults, decimals, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
QtWidgets.QWidget.__init__(self, parent=parent)
|
||||
self.layout = QtWidgets.QHBoxLayout()
|
||||
self.setLayout(self.layout)
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
self.fa_excellon_group = FAExcPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.fa_excellon_group = FAExcPrefGroupUI(app=app)
|
||||
self.fa_excellon_group.setMinimumWidth(260)
|
||||
|
||||
self.fa_gcode_group = FAGcoPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.fa_gcode_group = FAGcoPrefGroupUI(app=app)
|
||||
self.fa_gcode_group.setMinimumWidth(260)
|
||||
|
||||
self.fa_gerber_group = FAGrbPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.fa_gerber_group = FAGrbPrefGroupUI(app=app)
|
||||
self.fa_gerber_group.setMinimumWidth(260)
|
||||
|
||||
self.kw_group = AutoCompletePrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.kw_group = AutoCompletePrefGroupUI(app=app)
|
||||
self.kw_group.setMinimumWidth(260)
|
||||
|
||||
# this does not make sense in Linux and MacOs so w edo not display it for those OS's
|
||||
|
||||
Reference in New Issue
Block a user