Edit mode prep (#2370)

* remove edit mode

* small rename

* update with compat with old edit mode

* exit edit mode still needed

* add log to export
This commit is contained in:
Kurt Hutten
2024-05-21 05:55:34 +10:00
committed by GitHub
parent 031b230690
commit d73339fd8d
5 changed files with 33 additions and 8 deletions

View File

@ -188,7 +188,7 @@ export class KclManager {
engineCommandManager: this.engineCommandManager,
})
sceneInfra.modelingSend({ type: 'code edit during sketch' })
enterEditMode(programMemory, this.engineCommandManager)
defaultSelectionFilter(programMemory, this.engineCommandManager)
this.isExecuting = false
// Check the cancellation token for this execution before applying side effects
if (this._cancelTokens.get(currentExecutionId)) {
@ -348,9 +348,6 @@ export class KclManager {
void this.engineCommandManager.setPlaneHidden(this.defaultPlanes.yz, true)
void this.engineCommandManager.setPlaneHidden(this.defaultPlanes.xz, true)
}
enterEditMode() {
enterEditMode(this.programMemory, this.engineCommandManager)
}
exitEditMode() {
this.engineCommandManager.sendSceneCommand({
type: 'modeling_cmd_req',
@ -358,9 +355,12 @@ export class KclManager {
cmd: { type: 'edit_mode_exit' },
})
}
defaultSelectionFilter() {
defaultSelectionFilter(this.programMemory, this.engineCommandManager)
}
}
function enterEditMode(
function defaultSelectionFilter(
programMemory: ProgramMemory,
engineCommandManager: EngineCommandManager
) {