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.
- package/index.js +5 -1
- 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
|
-
|
|
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
|
}
|