Retain sketch selection segment color after adding a constraint to the segment (#2700)
* Start of basic test (not yet failing) * Add a little logging to get the lay of the scene object land * Move test colors to utility, test broken * Get accurate test that is only broken with highlighted color behavior * Working implementation but now initial segment color sticks around too long * Make sure segment base color is always the theme color * Remove console logs, refactor a couple lines to use if statements instead of inline booleans * Fix new test * Make origin color update like the other segment types * fmt * Fix issue where initially-selected segments lose highlight after hover * Undo this tweaking of the selection logic, this is really only about the clientSideEntities * Remove unused exports * Remove unnecessary code change from ModelingMachineProvider * Remove newline * Update src/clientSideScene/sceneEntities.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> --------- Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
This commit is contained in:
@ -900,7 +900,10 @@ export const modelingMachine = createMachine(
|
||||
sceneInfra.modelingSend('Equip Line tool')
|
||||
}
|
||||
},
|
||||
'setup client side sketch segments': ({ sketchDetails }) => {
|
||||
'setup client side sketch segments': ({
|
||||
sketchDetails,
|
||||
selectionRanges,
|
||||
}) => {
|
||||
if (!sketchDetails) return
|
||||
;(async () => {
|
||||
if (Object.keys(sceneEntitiesManager.activeSegments).length > 0) {
|
||||
@ -913,6 +916,7 @@ export const modelingMachine = createMachine(
|
||||
up: sketchDetails.yAxis,
|
||||
position: sketchDetails.origin,
|
||||
maybeModdedAst: kclManager.ast,
|
||||
selectionRanges,
|
||||
})
|
||||
sceneInfra.resetMouseListeners()
|
||||
sceneEntitiesManager.setupSketchIdleCallbacks({
|
||||
|
Reference in New Issue
Block a user