Clear stale hover on capture-loss and Alt-delete; derive gutter test via chromeRects

This commit is contained in:
2026-07-30 10:39:27 -04:00
parent 9812690b96
commit e89568c1a8
5 changed files with 26 additions and 7 deletions
+4 -1
View File
@@ -47,7 +47,10 @@ void ReaSamplerEditor::handleCurveMouseDown(const Rect& r, int x, int y) {
// Modifier-click (Alt) deletes an interior node — a discrete, final edit committed at once
// (deletePoint refuses the two endpoints, so an Alt-click on them is a safe no-op).
if (idx >= 0 && (GetKeyState(VK_MENU) & 0x8000) != 0) {
if (params_.velocityCurve.deletePoint(static_cast<std::size_t>(idx))) commitAndReload();
if (params_.velocityCurve.deletePoint(static_cast<std::size_t>(idx))) {
hover_ = HoverTarget{}; // a stale kCurveNode index would light a shifted node
commitAndReload();
}
return;
}