From af153643f23d44df60f851cdcfe588c786ce0710 Mon Sep 17 00:00:00 2001 From: sliptonic Date: Tue, 1 Dec 2020 09:43:45 -0600 Subject: [PATCH] PR review suggestions and fixes --- src/Mod/Path/Gui/Resources/preferences/PathJob.ui | 4 ++-- src/Mod/Path/PathScripts/PathToolBitGui.py | 4 ++-- src/Mod/Path/PathScripts/PathToolBitLibraryGui.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Mod/Path/Gui/Resources/preferences/PathJob.ui b/src/Mod/Path/Gui/Resources/preferences/PathJob.ui index bd29f158c0..15c9cfcb30 100644 --- a/src/Mod/Path/Gui/Resources/preferences/PathJob.ui +++ b/src/Mod/Path/Gui/Resources/preferences/PathJob.ui @@ -656,10 +656,10 @@ - <html><head/><body><p>Causes the toollibrary manager to remember last directory. This ONLY affects legacy tools. </p><p>This control will be deprecated and removed in future version</p></body></html> + <html><head/><body><p>Causes the toollibrary manager to remember last directory. This ONLY affects legacy tools. </p><p>This control is deprecated and will be removed in a future version</p></body></html> - Remember last library + Remember last library (legacy) diff --git a/src/Mod/Path/PathScripts/PathToolBitGui.py b/src/Mod/Path/PathScripts/PathToolBitGui.py index 6daac0e5e0..661531967e 100644 --- a/src/Mod/Path/PathScripts/PathToolBitGui.py +++ b/src/Mod/Path/PathScripts/PathToolBitGui.py @@ -181,7 +181,7 @@ class ToolBitGuiFactory(PathToolBit.ToolBitFactory): FreeCAD.ActiveDocument.commitTransaction() return tool -def isValidFile(filename): +def isValidFileName(filename): print(filename) try: with open(filename, "w") as tempfile: @@ -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) diff --git a/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py b/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py index 83417baec7..f28186fc7b 100644 --- a/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py +++ b/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py @@ -389,9 +389,9 @@ class ToolBitLibrary(object): 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)