mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-01 08:29:27 +02:00
Bug2526: Switching projects should not disable label editing
This commit is contained in:
parent
8799d26335
commit
d66ffaa4ce
@ -260,6 +260,19 @@ TrackPanel::TrackPanel(wxWindow * parent, wxWindowID id,
|
||||
#pragma warning( default: 4355 )
|
||||
#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);
|
||||
SetLabel(XO("Track Panel"));
|
||||
SetName(XO("Track Panel"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user