CAM: silence unnecessary log for preferences change when no change was actually made

This commit is contained in:
Samuel Abels
2025-07-09 10:19:22 +02:00
parent 3332c49271
commit 0ad45ac99a

View File

@@ -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)