Fix Insert-as-FX review findings: id rename, selection-count drift, refusal tooltip, success msg, master-only, reserve test

Renames the permanent action id out of the placement family, makes the button's
painted state and pressed outcome share one selection count, surfaces
panel-known refusals in the tooltip, reports the target track on success,
distinguishes a master-only selection, and pins the overflow-reserve test to the
real bar spec.
This commit is contained in:
2026-08-03 16:43:10 -04:00
parent fcd1ed022c
commit 51c7505dc0
8 changed files with 126 additions and 10 deletions
+7 -2
View File
@@ -4,10 +4,12 @@
namespace reasampler::ui {
InsertFxRefusal insertFxRefusal(int focusedCaptureCount, bool trackSelected) {
InsertFxRefusal insertFxRefusal(int focusedCaptureCount, bool trackSelected,
bool masterOnlySelected) {
if (focusedCaptureCount <= 0) return InsertFxRefusal::NoCapture;
if (focusedCaptureCount > 1) return InsertFxRefusal::MultiCapture;
if (!trackSelected) return InsertFxRefusal::NoTrack;
if (!trackSelected)
return masterOnlySelected ? InsertFxRefusal::MasterOnlySelected : InsertFxRefusal::NoTrack;
return InsertFxRefusal::None;
}
@@ -29,6 +31,9 @@ std::string insertFxRefusalMessage(InsertFxRefusal refusal) {
case InsertFxRefusal::NoTrack:
return "select a track first -- the instrument is added to the selected "
"track's FX chain";
case InsertFxRefusal::MasterOnlySelected:
return "select a track other than the master -- the master track cannot "
"host the instrument";
}
return {};
}