fix: close review findings on the velocity-curve deck and bipolar curves
Cancels the curve-node drag whenever the popup closes so Esc mid-drag can't alias the amp curve; generalizes CurveTarget routing to one switch; fixes stale/overstated comments; clamps a pre-v12 depth fold; adds deck-inertness and filter-fold test coverage.
This commit is contained in:
@@ -150,7 +150,7 @@ private:
|
||||
|
||||
// --- Band painters (one TU each, mirroring the input side) ---
|
||||
// Chrome: title band + Browse nav + the control row (root strip, preview, velocity knob,
|
||||
// curve button, channel toggle).
|
||||
// channel toggle).
|
||||
void paintChrome(LICE_IBitmap* bmp, const FaceLayout& fl, bool empty);
|
||||
// The hovered piano key's note-name chip. Drawn after every band — it overhangs the
|
||||
// chrome into whatever is below it.
|
||||
@@ -459,11 +459,22 @@ private:
|
||||
// delta from this anchor, so a grab never jumps the value.
|
||||
double dragKnobStartValue_ = 0.0;
|
||||
|
||||
// Which velocity curve the popup is editing; kNone = closed. Never persisted.
|
||||
// Which velocity curve the popup is editing; kNone = closed. Never persisted. Every writer
|
||||
// of kNone must also cancel a live curve-node drag (closeCurvePopup does both) — an Esc
|
||||
// mid-drag that closed the popup without cancelling the drag used to leave editedCurve()'s
|
||||
// mutable overload aliasing the amp curve underneath an in-flight pitch/filter drag.
|
||||
CurveTarget curvePopup_ = CurveTarget::kNone;
|
||||
// The parameter-set curve `curvePopup_` names. Both overloads exist because every edit
|
||||
// path needs the mutable one and paint needs the const one; routing through this ONE
|
||||
// switch is what keeps the three curves on a single popup/draw/hit-test code path.
|
||||
void closeCurvePopup();
|
||||
|
||||
// THE one switch from a CurveTarget to the parameter-set curve it names — paint (button
|
||||
// thumbnails, for every target) and edit (editedCurve, for curvePopup_ specifically) both
|
||||
// route through it, so a fourth curve or a moved field is a one-place edit.
|
||||
const VelocityCurve& curveFor(CurveTarget target) const;
|
||||
VelocityCurve& curveFor(CurveTarget target);
|
||||
|
||||
// The curve curvePopup_ names — curveFor(curvePopup_), typed as its own pair because every
|
||||
// edit path needs the mutable overload and paint needs the const one. The mutable overload
|
||||
// refuses kNone (a closed popup has nothing open to edit) rather than aliasing amp.
|
||||
VelocityCurve& editedCurve();
|
||||
const VelocityCurve& editedCurve() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user