PR review suggestions and fixes
This commit is contained in:
@@ -656,10 +656,10 @@
|
||||
<item>
|
||||
<widget class="QCheckBox" name="toolsOpenLastLibrary">
|
||||
<property name="toolTip">
|
||||
<string><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></string>
|
||||
<string><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></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remember last library</string>
|
||||
<string>Remember last library (legacy)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user