diff --git a/CHANGELOG.md b/CHANGELOG.md index e055882a..df192048 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/FlatCAM.py b/FlatCAM.py index 23f69d5d..fee30a4f 100644 --- a/FlatCAM.py +++ b/FlatCAM.py @@ -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)