1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-18 17:10:05 +02:00

Adjustment of fix for bug 1442

Issue was that an empty selection at time zero was included in the tab cycle.

This has been removed.
This commit is contained in:
David Bailes 2016-10-27 10:21:58 +01:00
parent ed503c35e5
commit edb99485da

View File

@ -1869,17 +1869,14 @@ bool LabelTrack::OnKeyDown(SelectedRegion &newSel, wxKeyEvent & event)
mSelIndex++;
}
if (mSelIndex >= 0 && mSelIndex < (int)mLabels.size()) {
mSelIndex = (mSelIndex + (int)mLabels.size()) % (int)mLabels.size(); // wrap round if necessary
{
LabelStruct &newLabel = mLabels[mSelIndex];
mCurrentCursorPos = newLabel.title.Length();
mInitialCursorPos = mCurrentCursorPos;
//Set the selection region to be equal to the selection bounds of the tabbed-to label.
newSel = newLabel.selectedRegion;
}
else {
newSel = SelectedRegion{};
mSelIndex = -1;
}
break;
case '\x10': // OSX