Skip to content

Commit b38c4b3

Browse files
author
alferio
committed
fix(stretch): hotspot stretch
Fixed the hotspot-driven stretch path too. Root cause: - hotspot runtime geometry for instances is rebuilt in GroupScene.recomputeInstanceGeometryFromPrototype(...) - applyHotspotToRuntimeGeometry(...) stretches triangles in place - that breaks the DraftFaceStore color map for the same reason as the regular stretch tool: mutable triangle keys change after vertex mutation Patch: - core/src/main/kotlin/com/github/alfu32/sketch/model/GroupScene.kt:1788 - after hotspot runtime geometry is applied, the temporary runtime lineStore and faceStore now call notifyExternalChange() - this rehashes: - face colors - face selection - line selection
1 parent 2d9c083 commit b38c4b3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

core/src/main/kotlin/com/github/alfu32/sketch/model/GroupScene.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1785,6 +1785,8 @@ class GroupScene(
17851785
vertexIdByHandle = vertexIdByHandle
17861786
)
17871787
}
1788+
lineStore.notifyExternalChange()
1789+
faceStore.notifyExternalChange()
17881790

17891791
if (selectedSegmentIds.isNotEmpty()) {
17901792
lineStore.getSegments().forEach { segment ->

0 commit comments

Comments
 (0)