diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Sketch-on-face-with-none-z-up-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Sketch-on-face-with-none-z-up-1-Google-Chrome-linux.png index 4c342ee87..782a7d2cf 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Sketch-on-face-with-none-z-up-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Sketch-on-face-with-none-z-up-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--YZ-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--YZ-1-Google-Chrome-linux.png index 0716e7ae6..25a7f38a0 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--YZ-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--YZ-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-XY-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-XY-1-Google-Chrome-linux.png index 9b7e43ef2..208609e04 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-XY-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-XY-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-YZ-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-YZ-1-Google-Chrome-linux.png index 1c273843b..6be9633d0 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-YZ-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-YZ-1-Google-Chrome-linux.png differ diff --git a/src/components/ModelingMachineProvider.tsx b/src/components/ModelingMachineProvider.tsx index ca68094c5..114cb524e 100644 --- a/src/components/ModelingMachineProvider.tsx +++ b/src/components/ModelingMachineProvider.tsx @@ -148,7 +148,6 @@ export const ModelingMachineProvider = ({ enableSSAO, }, } = useSettings() - const previousAllowOrbitInSketchMode = useRef(allowOrbitInSketchMode.current) const navigate = useNavigate() const { context, send: fileMachineSend } = useFileContext() const { file } = useLoaderData() as IndexLoaderData @@ -1841,14 +1840,6 @@ export const ModelingMachineProvider = ({ }, [engineCommandManager.engineConnection, modelingSend]) useEffect(() => { - // Only trigger this if the state actually changes, if it stays the same do not reload the camera - if ( - previousAllowOrbitInSketchMode.current === allowOrbitInSketchMode.current - ) { - //no op - previousAllowOrbitInSketchMode.current = allowOrbitInSketchMode.current - return - } const inSketchMode = modelingState.matches('Sketch') // If you are in sketch mode and you disable the orbit, return back to the normal view to the target @@ -1871,9 +1862,7 @@ export const ModelingMachineProvider = ({ if (inSketchMode) { sceneInfra.camControls.enableRotate = allowOrbitInSketchMode.current } - - previousAllowOrbitInSketchMode.current = allowOrbitInSketchMode.current - }, [allowOrbitInSketchMode]) + }, [allowOrbitInSketchMode.current]) // Allow using the delete key to delete solids. Backspace only on macOS as Windows and Linux have dedicated Delete // `navigator.platform` is deprecated, but the alternative `navigator.userAgentData.platform` is not reliable