1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-05 19:21:59 +01:00

Bug 305 - Analysis effects produce false indication that a label is open for editing

This was true of any Nyquist or VAMP effect that created labels.
This commit is contained in:
James Crook
2017-12-17 21:18:07 +00:00
parent d9bab5347a
commit 63de7f0884
5 changed files with 12 additions and 6 deletions

View File

@@ -2706,6 +2706,10 @@ int LabelTrack::GetLabelIndex(double t, double t1)
return wxNOT_FOUND;
}
// restoreFocus of -1 is the default, and sets the focus to this label.
// restoreFocus of -2 or other value leaves the focus unchanged.
// restoreFocus >= 0 will later cause focus to move to that track.
int LabelTrack::AddLabel(const SelectedRegion &selectedRegion,
const wxString &title, int restoreFocus)
{
@@ -2720,7 +2724,8 @@ int LabelTrack::AddLabel(const SelectedRegion &selectedRegion,
mLabels.insert(mLabels.begin() + pos, l);
mSelIndex = pos;
if( restoreFocus == -1 )
mSelIndex = pos;
// Make sure the caret is visible
//