- fixed a possible issue with having older versions of QSettings (leftovers from previous installations of this app)

This commit is contained in:
Marius Stanciu
2021-08-25 20:02:19 +03:00
parent 67120e3214
commit 17e26c9846
2 changed files with 6 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ CHANGELOG for FlatCAM beta
- fixed the "headless" feature; running headless still start the GUI just it does not show it
- when running headless the sys tray icon will always be shown so the user can close the app correctly
- in the systray icon context menu I've added a menu entry to toggle the GUI
- fixed a possible issue with having older versions of QSettings (leftovers from previous installations of this app)
24.08.2021

View File

@@ -157,7 +157,11 @@ if __name__ == '__main__':
settings = QSettings("Open Source", "FlatCAM")
if settings.contains("style"):
style_index = settings.value('style', type=str)
style = QtWidgets.QStyleFactory.keys()[int(style_index)]
try:
idx = int(style_index)
except Exception:
idx = 0
style = QtWidgets.QStyleFactory.keys()[idx]
app.setStyle(style)
fc = App(qapp=app)