Bug fix: prevent KCL error due to colliding AST execution on project switch (#3205)
* Only run "Execute AST" action if defaultUnit setting changes * A little more logging and catching anywhere we call video.play()
This commit is contained in:
@ -224,6 +224,7 @@ export class KclManager {
|
||||
|
||||
sceneInfra.modelingSend({ type: 'code edit during sketch' })
|
||||
defaultSelectionFilter(programMemory, this.engineCommandManager)
|
||||
await this.engineCommandManager.waitForAllCommands()
|
||||
|
||||
if (zoomToFit) {
|
||||
let zoomObjectId: string | undefined = ''
|
||||
@ -243,6 +244,15 @@ export class KclManager {
|
||||
padding: 0.1, // padding around the objects
|
||||
},
|
||||
})
|
||||
await this.engineCommandManager.sendSceneCommand({
|
||||
type: 'modeling_cmd_req',
|
||||
cmd_id: uuidv4(),
|
||||
cmd: {
|
||||
type: 'zoom_to_fit',
|
||||
object_ids: zoomObjectId ? [zoomObjectId] : [], // leave empty to zoom to all objects
|
||||
padding: 0.1, // padding around the objects
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
this.isExecuting = false
|
||||
|
Reference in New Issue
Block a user