Merge branch 'Beta'

Conflicts:
	flatcamGUI/preferences/general/GeneralGUIPrefGroupUI.py
This commit is contained in:
David Robertson
2020-05-07 02:27:44 +01:00
9 changed files with 580 additions and 371 deletions

View File

@@ -948,10 +948,10 @@ class ShapeCollectionLegacy:
"""
:param obj: This is the object to which the shapes collection is attached and for
which it will have to draw shapes
which it will have to draw shapes
:param app: This is the FLatCAM.App usually, needed because we have to access attributes there
:param name: This is the name given to the Matplotlib axes; it needs to be unique due of
Matplotlib requurements
Matplotlib requurements
:param annotation_job: Make this True if the job needed is just for annotation
:param linewidth: THe width of the line (outline where is the case)
"""

View File

@@ -184,13 +184,20 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI2):
def on_theme_change(self):
# FIXME: this should be moved out to a view model
val = self.theme_field.get_value()
qsettings = QSettings("Open Source", "FlatCAM")
qsettings.setValue("theme", val)
# This will write the setting to the platform specific storage.
del qsettings
theme_settings = QtCore.QSettings("Open Source", "FlatCAM")
if theme_settings.contains("theme"):
theme = theme_settings.value('theme', type=str)
else:
theme = 'white'
self.app.on_app_restart()
if val != theme:
theme_settings.setValue("theme", val)
# This will write the setting to the platform specific storage.
del theme_settings
self.app.on_app_restart()
def on_layout(self, index=None, lay=None):
if lay: