Switch preferences to use json files for templates.

This commit is contained in:
Markus Lampert
2017-09-23 13:40:47 -07:00
parent 86a8e6eda0
commit e56897df76
2 changed files with 5 additions and 2 deletions

View File

@@ -118,7 +118,10 @@ class PathPreferences:
@classmethod
def defaultJobTemplate(cls):
return cls.preferences().GetString(cls.DefaultJobTemplate)
template = cls.preferences().GetString(cls.DefaultJobTemplate)
if 'xml' not in template:
return template
return ''
@classmethod
def setJobDefaults(cls, filePath, jobTemplate, geometryTolerance):

View File

@@ -163,7 +163,7 @@ class JobPreferencesPage:
foo = QtGui.QFileDialog.getOpenFileName(QtGui.qApp.activeWindow(),
"Path - Job Template",
path,
"job_*.xml")[0]
"job_*.json")[0]
if foo:
self.form.leDefaultJobTemplate.setText(foo)