From 849e7d112edcedda4253153fc5e2d3d117b59297 Mon Sep 17 00:00:00 2001 From: Robin Schreiber Date: Tue, 19 Dec 2023 16:04:23 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B0:=20fix=20update=20heuristic=20for?= =?UTF-8?q?=20submorph=20changes=20in=20scene=20graph?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lively.ide/studio/interactive-tree.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lively.ide/studio/interactive-tree.js b/lively.ide/studio/interactive-tree.js index 8d8763a7b2..f92d7f454c 100644 --- a/lively.ide/studio/interactive-tree.js +++ b/lively.ide/studio/interactive-tree.js @@ -466,9 +466,9 @@ export class SceneGraphTree extends InteractiveTree { isNodeOutOfSync (node) { if (node === this._previewNode) return false; // preview does not represent a real morph if (this.treeData.root === node) { - return ( - this.treeData.root.children.length !== - this.target.submorphs.filter(m => !this.ignoreMorph(m)).length); + return !obj.equals( + this.treeData.root.children.map(m => m.container?.target.id), + this.target.submorphs.filter(m => !this.ignoreMorph(m)).id); } if (node.container.nameNeedsUpdate) return true; const actualSubmorphs = node.container.target.submorphs.filter(m => !this.ignoreMorph(m));