Skip to content

Commit

Permalink
fix bug in create toolbit flow
Browse files Browse the repository at this point in the history
  • Loading branch information
sliptonic committed Nov 16, 2020
1 parent 7c4c25c commit 42f7854
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Mod/Path/PathScripts/PathToolBitGui.py
Expand Up @@ -176,6 +176,18 @@ def Create(self, name='ToolBit', shapeFile=None):
return tool


def GetNewToolFile(parent=None):
if parent is None:
parent = QtGui.QApplication.activeWindow()
foo = QtGui.QFileDialog.getSaveFileName(parent, 'Tool',
PathPreferences.lastPathToolBit(),
'*.fctb')
if foo and foo[0]:
PathPreferences.setLastPathToolBit(os.path.dirname(foo[0]))
return foo[0]
return None


def GetToolFile(parent=None):
if parent is None:
parent = QtGui.QApplication.activeWindow()
Expand Down

0 comments on commit 42f7854

Please sign in to comment.