Path: Fixes #0004647, relative shape file locations

This solution restricts relative shape files to filename only within the toolbit file.
This commit is contained in:
Russell Johnson
2021-07-02 22:35:14 -05:00
parent b6b08a5a2e
commit 71f8007bab

View File

@@ -380,7 +380,10 @@ class ToolBit(object):
if PathPreferences.toolsStoreAbsolutePaths():
attrs['shape'] = obj.BitShape
else:
attrs['shape'] = findRelativePathShape(obj.BitShape)
# attrs['shape'] = findRelativePathShape(obj.BitShape)
# Extract the name of the shape file
__, filShp = os.path.split(obj.BitShape) # __ is an ignored placeholder acknowledged by LGTM
attrs['shape'] = str(filShp)
params = {}
for name in obj.BitPropertyNames:
params[name] = PathUtil.getPropertyValueString(obj, name)