mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-18 17:10:55 +02:00
Bug 1551 - Active transport inhibits the operation of "Type to create a label"
This commit is contained in:
parent
bc6ed77498
commit
21e330d0e7
@ -1743,6 +1743,11 @@ bool LabelTrack::DoCaptureKey(wxKeyEvent & event)
|
|||||||
if (IsGoodLabelFirstKey(event) && typeToCreateLabel) {
|
if (IsGoodLabelFirstKey(event) && typeToCreateLabel) {
|
||||||
AudacityProject * pProj = GetActiveProject();
|
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
|
// If we're playing, don't capture if the selection is the same as the
|
||||||
// playback region (this helps prevent label track creation from
|
// playback region (this helps prevent label track creation from
|
||||||
// stealing unmodified kbd. shortcuts)
|
// stealing unmodified kbd. shortcuts)
|
||||||
@ -1756,6 +1761,7 @@ bool LabelTrack::DoCaptureKey(wxKeyEvent & event)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// If there's a label there already don't capture
|
// If there's a label there already don't capture
|
||||||
if( GetLabelIndex(pProj->mViewInfo.selectedRegion.t0(),
|
if( GetLabelIndex(pProj->mViewInfo.selectedRegion.t0(),
|
||||||
@ -1803,7 +1809,7 @@ unsigned LabelTrack::KeyDown(wxKeyEvent & event, ViewInfo &viewInfo, wxWindow *W
|
|||||||
bkpSel1 != viewInfo.selectedRegion.t1())
|
bkpSel1 != viewInfo.selectedRegion.t1())
|
||||||
return RefreshCode::RefreshAll;
|
return RefreshCode::RefreshAll;
|
||||||
else if (!event.GetSkipped())
|
else if (!event.GetSkipped())
|
||||||
return RefreshCode::RefreshCell;
|
return RefreshCode::RefreshCell;
|
||||||
|
|
||||||
return RefreshCode::RefreshNone;
|
return RefreshCode::RefreshNone;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user