mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-17 08:30:06 +02:00
Bug 1852 - Ctrl+M does not open label for editing
- Now when recording, the recording track has a number >=0 and so the modified test will set the cursor for editing the label. - Bug 305 is still fixed, because Nyquist will pass -2 for the restore track.
This commit is contained in:
parent
205b7d6a02
commit
2cb76e0820
@ -2725,7 +2725,11 @@ int LabelTrack::AddLabel(const SelectedRegion &selectedRegion,
|
||||
|
||||
mLabels.insert(mLabels.begin() + pos, l);
|
||||
|
||||
if( restoreFocus == -1 )
|
||||
// restoreFocus is -2 e.g. from Nyquist label creation, when we should not
|
||||
// even lose the focus and open the label to edit in the first place.
|
||||
// -1 means we don't need to restore it to anywhere.
|
||||
// 0 or above is the track to restore to afetr editing the label is complete.
|
||||
if( restoreFocus >= -1 )
|
||||
mSelIndex = pos;
|
||||
|
||||
// Make sure the caret is visible
|
||||
|
Loading…
x
Reference in New Issue
Block a user