Skip to content

Commit

Permalink
PR review suggestions and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sliptonic committed Dec 1, 2020
1 parent 3d822cf commit af15364
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Mod/Path/Gui/Resources/preferences/PathJob.ui
Expand Up @@ -656,10 +656,10 @@
<item>
<widget class="QCheckBox" name="toolsOpenLastLibrary">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Causes the toollibrary manager to remember last directory. This ONLY affects legacy tools. &lt;/p&gt;&lt;p&gt;This control will be deprecated and removed in future version&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Causes the toollibrary manager to remember last directory. This ONLY affects legacy tools. &lt;/p&gt;&lt;p&gt;This control is deprecated and will be removed in a future version&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Remember last library</string>
<string>Remember last library (legacy)</string>
</property>
</widget>
</item>
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Path/PathScripts/PathToolBitGui.py
Expand Up @@ -181,7 +181,7 @@ def Create(self, name='ToolBit', shapeFile=None):
FreeCAD.ActiveDocument.commitTransaction()
return tool

def isValidFile(filename):
def isValidFileName(filename):
print(filename)
try:
with open(filename, "w") as tempfile:
Expand All @@ -198,7 +198,7 @@ def GetNewToolFile(parent=None):
PathPreferences.lastPathToolBit(),
'*.fctb')
if foo and foo[0]:
if not isValidFile(foo[0]):
if not isValidFileName(foo[0]):
msgBox = QtGui.QMessageBox()
msg = translate("Path", "Invalid Filename", None)
msgBox.setText(msg)
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Path/PathScripts/PathToolBitLibraryGui.py
Expand Up @@ -389,9 +389,9 @@ def checkWorkingDir(self):
return True

qm = PySide.QtGui.QMessageBox
ret = qm.question(None,'', "Please set up Toolbit Working Directory", qm.Ok | qm.Cancel)
ret = qm.question(None,'', "Toolbit working directory not set up. Do that now?", qm.Yes | qm.No)

if ret == qm.Cancel:
if ret == qm.No:
return False

msg = translate("Path", "Choose a writable location for your toolbits", None)
Expand Down

0 comments on commit af15364

Please sign in to comment.