mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-23 17:25:54 +01:00
Bug2526: Switching projects should not disable label editing
This commit is contained in:
@@ -260,6 +260,19 @@ TrackPanel::TrackPanel(wxWindow * parent, wxWindowID id,
|
|||||||
#pragma warning( default: 4355 )
|
#pragma warning( default: 4355 )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
// Whenever activation swaps between projects, the track panel "captures"
|
||||||
|
// the keyboard, which means its sub-cells like Label tracks are given
|
||||||
|
// the chance to process keystrokes before CommandManager.
|
||||||
|
std::once_flag flag;
|
||||||
|
std::call_once(flag, []{
|
||||||
|
wxTheApp->Bind(EVT_PROJECT_ACTIVATION,
|
||||||
|
[](wxCommandEvent &){
|
||||||
|
auto pProject = GetActiveProject();
|
||||||
|
if ( pProject )
|
||||||
|
KeyboardCapture::Capture( &TrackPanel::Get( *pProject ) );
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
SetLayoutDirection(wxLayout_LeftToRight);
|
SetLayoutDirection(wxLayout_LeftToRight);
|
||||||
SetLabel(XO("Track Panel"));
|
SetLabel(XO("Track Panel"));
|
||||||
SetName(XO("Track Panel"));
|
SetName(XO("Track Panel"));
|
||||||
|
|||||||
Reference in New Issue
Block a user