Merge pull request #22392 from knipknap/fix-test-uses-user-data
CAM: fix: CAM tests use files from user asset dir
This commit is contained in:
@@ -128,6 +128,8 @@ def getAssetPath() -> pathlib.Path:
|
||||
|
||||
def setAssetPath(path: pathlib.Path):
|
||||
assert path.is_dir(), f"Cannot put a non-initialized asset directory into preferences: {path}"
|
||||
if str(path) == str(getAssetPath()):
|
||||
return
|
||||
pref = tool_preferences()
|
||||
pref.SetString(ToolPath, str(path))
|
||||
_emit_change(ToolGroup, ToolPath, path)
|
||||
|
||||
@@ -18,7 +18,6 @@ cam_assets.register_asset(ToolBitShape, DummyAssetSerializer)
|
||||
cam_assets.register_asset(ToolBitShapePngIcon, DummyAssetSerializer)
|
||||
cam_assets.register_asset(ToolBitShapeSvgIcon, DummyAssetSerializer)
|
||||
cam_assets.register_asset(Machine, DummyAssetSerializer)
|
||||
cam_assets.setup()
|
||||
|
||||
# For backward compatibility with files saved before the toolbit rename
|
||||
# This makes the Path.Tool.toolbit.base module available as Path.Tool.Bit.
|
||||
|
||||
Reference in New Issue
Block a user