From 6d0ed52308175cc79395f3124d557d0c72dbbdaa Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Sat, 23 Feb 2019 19:06:20 +0200 Subject: [PATCH] - prettified the defaults files and the recent file. Now they are ordered and human readable --- FlatCAMApp.py | 6 +++--- README.md | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/FlatCAMApp.py b/FlatCAMApp.py index 48def49b..edc32556 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -2310,7 +2310,7 @@ class App(QtCore.QObject): return #try: - json.dump(self.recent, f) + json.dump(self.recent, f, default=to_dict, indent=2, sort_keys=True) # except: # App.log.error("Failed to write to recent items file.") # self.inform.emit('ERROR: Failed to write to recent items file.') @@ -2684,7 +2684,7 @@ class App(QtCore.QObject): # Save update options try: f = open(self.data_path + "/current_defaults.FlatConfig", "w") - json.dump(defaults, f) + json.dump(defaults, f, default=to_dict, indent=2, sort_keys=True) f.close() except: self.inform.emit("[ERROR_NOTCL] Failed to write defaults to file.") @@ -2757,7 +2757,7 @@ class App(QtCore.QObject): # Save update options try: f_f_def_s = open(self.data_path + "/factory_defaults.FlatConfig", "w") - json.dump(factory_defaults, f_f_def_s) + json.dump(factory_defaults, f_f_def_s, default=to_dict, indent=2, sort_keys=True) f_f_def_s.close() except: self.inform.emit("[ERROR_NOTCL] Failed to write factory defaults to file.") diff --git a/README.md b/README.md index 71dead16..11e0557f 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ CAD program, and create G-Code for Isolation routing. 24.02.2019 - fixed a small bug in the Tool Solder Paste: the App don't take into consideration pads already filled with solder paste. +- prettified the defaults files and the recent file. Now they are ordered and human readable 23.02.2019