feat: maintain Part Design body tip

This commit is contained in:
2026-08-02 21:40:44 -04:00
parent 2a0b14b26d
commit 10921a086e
4 changed files with 16 additions and 3 deletions

View File

@@ -783,12 +783,15 @@ test('Part Design feature tasks commit a document object and remain undoable', (
assert.equal(committed.objects.find((object) => object.id === 'pad001')?.properties.find((property) => property.name === 'Length')?.value, 55)
assert.equal(committed.objects.find((object) => object.id === 'pad001')?.properties.find((property) => property.name === 'Reversed')?.value, true)
assert.equal(committed.objects.find((object) => object.id === 'pad001')?.properties.find((property) => property.name === 'Midplane')?.value, true)
assert.equal(committed.objects.find((object) => object.id === 'body')?.properties.find((property) => property.name === 'Tip')?.value, 'pad001')
assert.ok(committed.recompute?.dirtyObjects.includes('pad001'))
facade.history.undo()
assert.equal(facade.app.document.getActive().tree.some((item) => item.id === 'pad001'), false)
assert.equal(facade.app.document.getObject('body')?.properties.find((property) => property.name === 'Tip')?.value, 'fillet')
facade.history.redo()
assert.equal(facade.app.document.getActive().tree.some((item) => item.id === 'pad001'), true)
assert.equal(facade.app.document.getObject('body')?.properties.find((property) => property.name === 'Tip')?.value, 'pad001')
facade.gui.command.execute({ commandId: 'revolution' })
assert.equal(facade.task.getActive()?.commandId, 'revolution')