Element list doesn't fully update when switching assemblies #20
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Each item in a Sycamore keyed list is assigned a diff key. During a list update, when Sycamore sees an item whose diff key matches an item that's already on the list, it doesn't bother re-rendering that item.
In the outline view, the diff key we assign to an element or constraint is the slab key we use to access that element or constraint within the current assembly. As a result, elements in different assemblies can have matching diff keys.
The assembly switcher clears the previous assembly and builds the new assembly all in one update. When an element of the new assembly happens to have the same diff key as an element of the previous assembly, Sycamore doesn't re-render that item. Instead, it keeps showing the element of the previous assembly.
Reproduction
To see this happen, try switching from the "General' example to the "Low-curvature" example immediately after loading the page. Most of the element labels will stay the same—but the two examples don't actually have any labels in common.
Element list doesn't update properly when switching assembliesto Element list doesn't fully update when switching assemblies