After a sketch keep the extrude button active (#2961)

* After a sketch keep the extrude button active

* add test

* Compare to 0,0 not any x,x or y,y

---------

Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
This commit is contained in:
49fl
2024-07-10 10:08:15 -04:00
committed by GitHub
parent 73e26cbb4d
commit 3160c58d8a
3 changed files with 57 additions and 0 deletions

View File

@ -35,6 +35,7 @@ import {
canExtrudeSelection,
handleSelectionBatch,
isSelectionLastLine,
isRangeInbetweenCharacters,
isSketchPipe,
updateSelections,
} from 'lib/selections'
@ -425,6 +426,7 @@ export const ModelingMachineProvider = ({
if (
selectionRanges.codeBasedSelections.length === 0 ||
isRangeInbetweenCharacters(selectionRanges) ||
isSelectionLastLine(selectionRanges, codeManager.code)
) {
// they have no selection, we should enable the button