@@ -434,25 +434,17 @@ function useHoveredDerivedEdge() {
434434 const selectedFaces = Array . from ( this . selectedSolidFaceKeys || [ ] ) ;
435435 const hovered = this . hoveredDerivedCandidate || null ;
436436 if ( ! selectedEdges . length && ! selectedPoints . length && ! selectedFaces . length ) {
437- // Prefer hovered face derive over implicit edge derive when nothing is
438- // explicitly selected. This keeps `u` on face interiors intuitive.
439- if ( this . hoveredSolidFaceKey ) {
437+ // `u` should prioritize the actively hovered derived edge candidate.
438+ if ( hovered ?. aLocal && hovered ?. bLocal ) {
439+ selectedEdges . push ( {
440+ type : 'edge' ,
441+ aLocal : hovered . aLocal ,
442+ bLocal : hovered . bLocal ,
443+ source : hovered . source || null
444+ } ) ;
445+ } else if ( this . hoveredSolidFaceKey ) {
446+ // Face derive is fallback only when no discrete edge is hovered.
440447 selectedFaces . push ( this . hoveredSolidFaceKey ) ;
441- } else if ( hovered ?. aLocal && hovered ?. bLocal ) {
442- if ( hovered ?. hoverPoint ?. local && ( hovered ?. hoverPoint ?. kind === 'a' || hovered ?. hoverPoint ?. kind === 'b' || hovered ?. hoverPoint ?. kind === 'mid' ) ) {
443- selectedPoints . push ( {
444- type : 'point' ,
445- local : hovered . hoverPoint . local ,
446- source : { ...( hovered . source || { } ) , local_point : null , point_kind : hovered . hoverPoint . kind || 'mid' }
447- } ) ;
448- } else {
449- selectedEdges . push ( {
450- type : 'edge' ,
451- aLocal : hovered . aLocal ,
452- bLocal : hovered . bLocal ,
453- source : hovered . source || null
454- } ) ;
455- }
456448 }
457449 }
458450 const created = this . deriveSelectionsAtomic ( feature , {
@@ -461,6 +453,9 @@ function useHoveredDerivedEdge() {
461453 faces : selectedFaces
462454 } ) ;
463455 if ( ! created ) return false ;
456+ // Prevent immediate face-boundary re-highlight after `u` when cursor is still nearby.
457+ this . hoveredSolidFaceKey = null ;
458+ api . solids ?. setHoveredFace ?. ( null ) ;
464459 this . clearSketchSelection ?. ( ) ;
465460 return true ;
466461}
0 commit comments