dsh-cad-studio 0.29.0 → 0.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +5 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1047,7 +1047,11 @@ class FreeCadBridge {
1047
1047
  this.scenes.delete(key)
1048
1048
  for (const [asmId, rec] of [...this.assemblies]) if (rec.sceneId === key) this.assemblies.delete(asmId)
1049
1049
  try { await rm(join(FreeCadBridge.dataDir, 'scenes', `${key}.json`), { force: true }) } catch {}
1050
- if (this.latest && this.latest.id === key) {
1050
+ // Re-point the "latest" pointer whenever it went stale: the deleted row may
1051
+ // be it, and after a fresh process it may be null while the rows still say
1052
+ // otherwise — either way the panel's live tab must not end up pointing at
1053
+ // nothing (it renders an empty viewport and looks like the tool broke).
1054
+ if (!this.latest || this.latest.id === key) {
1051
1055
  const next = this.history[0]
1052
1056
  this.latest = next ? { id: next.id, title: next.title, at: next.at, scene: this.scenes.get(next.id) ?? null } : null
1053
1057
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-cad-studio",
3
- "version": "0.29.0",
3
+ "version": "0.29.1",
4
4
  "type": "module",
5
5
  "description": "CAD Studio — FreeCAD 桥(给 AI 的 14 个工具)+ Web 右栏 3D 面板:建模/装配/关节运动/出图/多页签查看",
6
6
  "exports": {