mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 17:30:17 +01:00
Pass AudacityProject as context into TrackPanelCell key handlers...
... as was done for mouse events. This eliminates some need for GetActiveProject(), which is good, and prepares for the fix for bug 2141
This commit is contained in:
@@ -539,7 +539,7 @@ void CellularPanel::OnCaptureKey(wxCommandEvent & event)
|
||||
const auto t = GetFocusedCell();
|
||||
if (t) {
|
||||
const unsigned refreshResult =
|
||||
t->CaptureKey(*kevent, *mViewInfo, this);
|
||||
t->CaptureKey(*kevent, *mViewInfo, this, GetProject());
|
||||
ProcessUIHandleResult(t, t, refreshResult);
|
||||
event.Skip(kevent->GetSkipped());
|
||||
}
|
||||
@@ -597,7 +597,7 @@ void CellularPanel::OnKeyDown(wxKeyEvent & event)
|
||||
|
||||
if (t) {
|
||||
const unsigned refreshResult =
|
||||
t->KeyDown(event, *mViewInfo, this);
|
||||
t->KeyDown(event, *mViewInfo, this, GetProject());
|
||||
ProcessUIHandleResult(t, t, refreshResult);
|
||||
}
|
||||
else
|
||||
@@ -620,7 +620,7 @@ void CellularPanel::OnChar(wxKeyEvent & event)
|
||||
const auto t = GetFocusedCell();
|
||||
if (t) {
|
||||
const unsigned refreshResult =
|
||||
t->Char(event, *mViewInfo, this);
|
||||
t->Char(event, *mViewInfo, this, GetProject());
|
||||
ProcessUIHandleResult(t, t, refreshResult);
|
||||
}
|
||||
else
|
||||
@@ -652,7 +652,7 @@ void CellularPanel::OnKeyUp(wxKeyEvent & event)
|
||||
const auto t = GetFocusedCell();
|
||||
if (t) {
|
||||
const unsigned refreshResult =
|
||||
t->KeyUp(event, *mViewInfo, this);
|
||||
t->KeyUp(event, *mViewInfo, this, GetProject());
|
||||
ProcessUIHandleResult(t, t, refreshResult);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user