fix: close round-2 review findings — Critical silent-note bug plus majors/minors

Fixes the 2-point spline-EG early-free bug causing silent fade-ins, the pitch/filter enable-toggle Trigger-forcing hole, the contour-node/marker pixel shadow, missing deck-residue test coverage, and stale comments in knob_deck and spline_edit.
This commit is contained in:
2026-07-31 23:12:08 -04:00
parent d8ffd860d1
commit c3d67bc3da
12 changed files with 150 additions and 30 deletions
+11 -10
View File
@@ -31,11 +31,6 @@ bool ReaSamplerEditor::mouseDownWaveform(const FaceLayout& fl, int x, int y) {
if (frames <= 0) return false;
const OverlayArea overlay = waveformOverlayArea(fl.bands.waveform);
// A drawn EG's contour is evaluated below, AFTER the markers: pointAtPixel's pick radius
// has no box check of its own, so a coincident contour node would otherwise shadow a
// marker's own dedicated grab rect (the loop-crossfade tab most sharply, since it is the
// ONLY affordance at zero crossfade) — marker reachability wins on any pixel overlap. The
// staged envelope-node pass just below is unaffected (its own, longer-standing ordering).
const DeckEnableState gates = deckEnableState();
const bool splineLive = overlayIsSpline() && overlayEnvEnabled(overlayEnv_, gates);
const SplineGesture gesture = (GetKeyState(VK_CONTROL) & 0x8000) != 0
@@ -64,6 +59,17 @@ bool ReaSamplerEditor::mouseDownWaveform(const FaceLayout& fl, int x, int y) {
return true; // node moves once the cursor drags
}
}
// An existing contour node's grab/toggle/delete runs BEFORE the markers — mirroring
// markerHandleRect's tab-vs-column split (below): a coincident pixel (the default contour
// endpoint sits at the same x as the default start marker) is resolved by asking the
// NARROWER target first. pointAtPixel's pick radius is a small box around the node's own
// (x, y), not a full-height column, so this claims only genuine node hits — the marker's
// column stays grabbable at every other y along the same x. Never add here (kAdd is only
// tried once the markers have also passed on the click, below).
if (splineLive && splineOverlayClick(overlay, x, y, gesture, /*addOnEmptySpace=*/false)) {
return true;
}
const SetupMarkers m = pickedMarkers(frames);
// The crossfade handle first, and only when there IS a loop to fade: at a zero fade it
// sits exactly on the loop start, so it can only stay reachable by owning the top strip
@@ -82,11 +88,6 @@ bool ReaSamplerEditor::mouseDownWaveform(const FaceLayout& fl, int x, int y) {
beginMarkerDrag(static_cast<WaveMarker>(hit), m, frames, x);
return true;
}
// No marker wanted the click: a drawn EG's own node grab/toggle (never add — empty space is
// tried last, below).
if (splineLive && splineOverlayClick(overlay, x, y, gesture, /*addOnEmptySpace=*/false)) {
return true;
}
// Nothing else wanted the click: now the drawn contour may take the empty space.
if (splineLive) return splineOverlayClick(overlay, x, y, gesture, /*addOnEmptySpace=*/true);
return false;