Fix Toolbar flash bug (during sketchMode animation (#5564)

* fix toolbar flash during animation

* add regression test

* fmt

* test tweak

* fmt
This commit is contained in:
Kurt Hutten
2025-02-28 15:50:01 +11:00
committed by GitHub
parent a0924bcfa3
commit b1b00a9a22
4 changed files with 98 additions and 54 deletions

View File

@ -56,7 +56,12 @@ export type ToolbarItemResolved = Omit<
export const toolbarConfig: Record<ToolbarModeName, ToolbarMode> = {
modeling: {
check: (state) =>
!(state.matches('Sketch') || state.matches('Sketch no face')),
!(
state.matches('Sketch') ||
state.matches('Sketch no face') ||
state.matches('animating to existing sketch') ||
state.matches('animating to plane')
),
items: [
{
id: 'sketch',
@ -330,7 +335,10 @@ export const toolbarConfig: Record<ToolbarModeName, ToolbarMode> = {
},
sketching: {
check: (state) =>
state.matches('Sketch') || state.matches('Sketch no face'),
state.matches('Sketch') ||
state.matches('Sketch no face') ||
state.matches('animating to existing sketch') ||
state.matches('animating to plane'),
items: [
{
id: 'sketch-exit',