diff --git a/df-curvy-walls/CHANGELOG.md b/df-curvy-walls/CHANGELOG.md index 96bd95c..b7d3fa9 100644 --- a/df-curvy-walls/CHANGELOG.md +++ b/df-curvy-walls/CHANGELOG.md @@ -3,6 +3,7 @@ ## Release 4.0.0 (2025-02-24) - **UPDATE:** Migrated to v12. - **UPDATE:** Downgraded TS -> JS (such sad). +- **FIX #369:** Fix tool crash when tool is being placed and user switches canvas layers. ## Release 3.4.0 (2022-10-15) - **UPDATE:** Migrated to FoundryVTT v10. diff --git a/df-curvy-walls/include b/df-curvy-walls/include index abe19b8..72c8829 100644 --- a/df-curvy-walls/include +++ b/df-curvy-walls/include @@ -1 +1,2 @@ -Settings.mjs \ No newline at end of file +Settings.mjs +libWrapper.d.ts \ No newline at end of file diff --git a/df-curvy-walls/module.json b/df-curvy-walls/module.json index 69ec284..1255805 100644 --- a/df-curvy-walls/module.json +++ b/df-curvy-walls/module.json @@ -15,7 +15,7 @@ { "id": "lib-df-buttons", "type": "module", - "compatibility": { "verified": "2.0.1", "minimum": "2.0.1" } + "compatibility": { "verified": "2.0.2", "minimum": "2.0.1" } } ] }, diff --git a/df-curvy-walls/src/CurvyWallToolManager.mjs b/df-curvy-walls/src/CurvyWallToolManager.mjs index f3042a6..1aa02f5 100644 --- a/df-curvy-walls/src/CurvyWallToolManager.mjs +++ b/df-curvy-walls/src/CurvyWallToolManager.mjs @@ -3,6 +3,7 @@ /// /// /// +/// import { ToolMode } from './tools/BezierTool.mjs'; import CircleTool from './tools/CircleTool.mjs'; @@ -348,6 +349,10 @@ export class CurvyWallToolManager { this.clearTool(); wrapper(...args); }, 'WRAPPER'); + libWrapper.register(SETTINGS.MOD_NAME, 'WallsLayer.prototype.clearPreviewContainer', (/**@type {Function}*/wrapped) => { + this.clearTool(); + return wrapped(); + }, 'WRAPPER'); } patchWallsLayer() {