1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-02 00:29:41 +02:00

Bug 1551 - Active transport inhibits the operation of "Type to create a label"

This commit is contained in:
James Crook 2018-03-17 12:35:53 +00:00
parent bc6ed77498
commit 21e330d0e7

View File

@ -1743,6 +1743,11 @@ bool LabelTrack::DoCaptureKey(wxKeyEvent & event)
if (IsGoodLabelFirstKey(event) && typeToCreateLabel) {
AudacityProject * pProj = GetActiveProject();
// The commented out code can prevent label creation, causing bug 1551
// We should only be in DoCaptureKey IF this label track has focus,
// and in that case creating a Label is the expected/intended thing.
#if 0
// If we're playing, don't capture if the selection is the same as the
// playback region (this helps prevent label track creation from
// stealing unmodified kbd. shortcuts)
@ -1756,6 +1761,7 @@ bool LabelTrack::DoCaptureKey(wxKeyEvent & event)
return false;
}
}
#endif
// If there's a label there already don't capture
if( GetLabelIndex(pProj->mViewInfo.selectedRegion.t0(),
@ -1803,7 +1809,7 @@ unsigned LabelTrack::KeyDown(wxKeyEvent & event, ViewInfo &viewInfo, wxWindow *W
bkpSel1 != viewInfo.selectedRegion.t1())
return RefreshCode::RefreshAll;
else if (!event.GetSkipped())
return RefreshCode::RefreshCell;
return RefreshCode::RefreshCell;
return RefreshCode::RefreshNone;
}