Skip to content

Commit

Permalink
Merge pull request #2368 from Russ4262/patch-1
Browse files Browse the repository at this point in the history
[Path] Auto prefix job template filename on save
  • Loading branch information
sliptonic committed Jul 24, 2019
2 parents d83abca + 2212a4e commit f1fb168
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Mod/Path/PathScripts/PathJobCmd.py
Expand Up @@ -133,7 +133,14 @@ def SaveDialog(cls, job, dialog):
"Path - Job Template",
PathPreferences.filePath(),
"job_*.json")[0]
if foo:
if foo:
s = '/'
splitList = foo.split(s)
li = len(splitList) - 1
if splitList[li][-5:] == '.json':
if splitList[li][:4] != 'job_' and splitList[li][:4] != 'Job_':
splitList[li] = 'Job_' + splitList[li]
foo = s.join(splitList)
cls.Execute(job, foo, dialog)

@classmethod
Expand Down

0 comments on commit f1fb168

Please sign in to comment.