- fixed bug that created a choppy geometry for CNCJob when working in INCH

- fixed bug that did not asked the user to save the preferences after importing a new set of preferences, after the user is trying to close the Preferences tab window
This commit is contained in:
Marius Stanciu
2019-08-10 11:46:23 +03:00
parent 40dc73ce93
commit 89717642ed
5 changed files with 101 additions and 175 deletions

View File

@@ -2841,6 +2841,7 @@ class App(QtCore.QObject):
self.inform.emit(_("[ERROR_NOTCL] Failed to parse defaults file."))
return
self.defaults.update(defaults_from_file)
self.on_preferences_edited()
self.inform.emit(_("[success] Imported Defaults from %s") % filename)
def on_export_preferences(self):
@@ -2875,6 +2876,10 @@ class App(QtCore.QObject):
f = open(filename, 'w')
defaults_file_content = f.read()
f.close()
except PermissionError:
self.inform.emit(_("[WARNING] Permission denied, saving not possible.\n"
"Most likely another app is holding the file open and not accessible."))
return
except IOError:
App.log.debug('Creating a new preferences file ...')
f = open(filename, 'w')