UI fix for comment settings collision (#6249)
* UI fix for comment settings collision * fmt * Fix tsc by using Promise.reject --------- Co-authored-by: Frank Noirot <frankjohnson1993@gmail.com>
This commit is contained in:
@ -1180,7 +1180,8 @@ export class SceneEntities {
|
||||
_ast = pResult.program
|
||||
|
||||
// do a quick mock execution to get the program memory up-to-date
|
||||
await this.kclManager.executeAstMock(_ast)
|
||||
const didReParse = await this.kclManager.executeAstMock(_ast)
|
||||
if (err(didReParse)) return didReParse
|
||||
|
||||
const justCreatedNode = getNodeFromPath<VariableDeclaration>(
|
||||
_ast,
|
||||
@ -1580,7 +1581,8 @@ export class SceneEntities {
|
||||
_ast = pResult.program
|
||||
|
||||
// do a quick mock execution to get the program memory up-to-date
|
||||
await this.kclManager.executeAstMock(_ast)
|
||||
const didReParse = await this.kclManager.executeAstMock(_ast)
|
||||
if (err(didReParse)) return didReParse
|
||||
|
||||
const { truncatedAst } = await this.setupSketch({
|
||||
sketchEntryNodePath: updatedEntryNodePath,
|
||||
@ -1775,7 +1777,8 @@ export class SceneEntities {
|
||||
_ast = pResult.program
|
||||
|
||||
// do a quick mock execution to get the program memory up-to-date
|
||||
await this.kclManager.executeAstMock(_ast)
|
||||
const didReParse = await this.kclManager.executeAstMock(_ast)
|
||||
if (err(didReParse)) return didReParse
|
||||
|
||||
const index = sg.paths.length // because we've added a new segment that's not in the memory yet
|
||||
const draftExpressionsIndices = { start: index, end: index }
|
||||
@ -2002,7 +2005,8 @@ export class SceneEntities {
|
||||
_ast = pResult.program
|
||||
|
||||
// do a quick mock execution to get the program memory up-to-date
|
||||
await this.kclManager.executeAstMock(_ast)
|
||||
const didReParse = await this.kclManager.executeAstMock(_ast)
|
||||
if (err(didReParse)) return didReParse
|
||||
|
||||
const index = sg.paths.length // because we've added a new segment that's not in the memory yet
|
||||
const draftExpressionsIndices = { start: index, end: index }
|
||||
@ -2267,7 +2271,8 @@ export class SceneEntities {
|
||||
_ast = pResult.program
|
||||
|
||||
// do a quick mock execution to get the program memory up-to-date
|
||||
await this.kclManager.executeAstMock(_ast)
|
||||
const didReParse = await this.kclManager.executeAstMock(_ast)
|
||||
if (err(didReParse)) return didReParse
|
||||
|
||||
const { truncatedAst } = await this.setupSketch({
|
||||
sketchEntryNodePath: updatedEntryNodePath,
|
||||
@ -2500,7 +2505,10 @@ export class SceneEntities {
|
||||
addingNewSegmentStatus = 'pending'
|
||||
if (trap(mod)) return
|
||||
|
||||
await this.kclManager.executeAstMock(mod.modifiedAst)
|
||||
const didReParse = await this.kclManager.executeAstMock(
|
||||
mod.modifiedAst
|
||||
)
|
||||
if (err(didReParse)) return
|
||||
this.tearDownSketch({ removeAxis: false })
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.setupSketch({
|
||||
|
Reference in New Issue
Block a user