From bd98bb42c4844d1bcbbd33f6943e0978afb1b97f Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Wed, 28 Oct 2020 03:47:34 +0200 Subject: [PATCH] - fixed an error that did not allowed for the older preferences to be deleted when installing a different version of the software --- CHANGELOG.md | 1 + app_Main.py | 4 ++-- defaults.py | 16 ++++++++-------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15882e0e..d363bae7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ CHANGELOG for FlatCAM beta - in Geometry UI and for Solderpaste Tool replaced the pop up window that is launched when using shortcut key with one that has the context menu translated - some UI cleanup in the Geometry UI - updated the translation strings except Russian which could be in the works +- fixed an error that did not allowed for the older preferences to be deleted when installing a different version of the software 27.10.2020 diff --git a/app_Main.py b/app_Main.py index a39ea24e..e64b019f 100644 --- a/app_Main.py +++ b/app_Main.py @@ -164,8 +164,8 @@ class App(QtCore.QObject): # ############################################################################################################### # ################################### Version and VERSION DATE ################################################## # ############################################################################################################### - version = "Unstable Version" - # version = 8.994 + # version = "Unstable Version" + version = 8.994 version_date = "2020/10/30" beta = True diff --git a/defaults.py b/defaults.py index 0b800ee7..b5b8cb18 100644 --- a/defaults.py +++ b/defaults.py @@ -778,14 +778,14 @@ class FlatCAMDefaults: with open(file_path, "r") as file: f_defaults = simplejson.loads(file.read()) - # if the file is not empty - if f_defaults: - # if it has the same version do nothing - if str(f_defaults['version']) == str(version): - return - # if the versions differ then remove the file - os.chmod(file_path, stat.S_IRWXO | stat.S_IWRITE | stat.S_IWGRP) - os.remove(file_path) + # if the file is not empty + if f_defaults: + # if it has the same version do nothing + if str(f_defaults['version']) == str(version): + return + # if the versions differ then remove the file + os.chmod(file_path, stat.S_IRWXO | stat.S_IWRITE | stat.S_IWGRP) + os.remove(file_path) cls.factory_defaults['version'] = version