Switch preferences to use json files for templates.
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user