fix no profile errors (#5877)

* fix no profile errors

* add test and tweak a couple things

* quick fix

* fix animation

* add another test

* Use actor.getSnapshot in the debug function

So we don't have to rebuild that listener every time that the state
changes.

* try fix tests

---------

Co-authored-by: Frank Noirot <frankjohnson1993@gmail.com>
This commit is contained in:
Kurt Hutten
2025-03-20 08:30:11 +11:00
committed by GitHub
parent e7d00f148b
commit 4b6166dc4f
9 changed files with 195 additions and 31 deletions

View File

@ -580,8 +580,7 @@ export class SceneEntities {
if (interaction !== 'none') return
if (args.mouseEvent.which !== 1) return
const { intersectionPoint } = args
if (!intersectionPoint?.twoD || !sketchDetails?.sketchEntryNodePath)
return
if (!intersectionPoint?.twoD) return
const parent = getParentGroup(
args?.intersects?.[0]?.object,
@ -616,7 +615,7 @@ export class SceneEntities {
const inserted = insertNewStartProfileAt(
kclManager.ast,
sketchDetails.sketchEntryNodePath,
sketchDetails.sketchEntryNodePath || [],
sketchDetails.sketchNodePaths,
sketchDetails.planeNodePath,
[snappedClickPoint.x, snappedClickPoint.y],