1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-29 06:59:27 +02:00

Fix bug 187.

This commit is contained in:
v.audacity 2012-02-14 00:18:29 +00:00
parent fbb6ed4fe6
commit 0d08f11504
3 changed files with 20 additions and 0 deletions

View File

@ -1650,6 +1650,14 @@ bool AudacityProject::HandleKeyDown(wxKeyEvent & event)
if (event.GetKeyCode() == WXK_CONTROL)
mTrackPanel->HandleControlKey(true);
// Allow PageUp and PageDown keys to
//scroll the Track Panel left and right
if (event.GetKeyCode() == WXK_PAGEUP)
mTrackPanel->HandlePageUpKey();
if (event.GetKeyCode() == WXK_PAGEDOWN)
mTrackPanel->HandlePageDownKey();
// If a window has captured the keyboard, then allow it
// first dibs at the event. If it does an event.Skip(false)
// then allow the event to process as normal, bypassing the

View File

@ -1375,6 +1375,16 @@ void TrackPanel::HandleControlKey(bool down)
HandleCursorForLastMouseEvent();
}
void TrackPanel::HandlePageUpKey()
{
mListener->TP_ScrollWindow(mViewInfo->h + mViewInfo->screen);
}
void TrackPanel::HandlePageDownKey()
{
mListener->TP_ScrollWindow(mViewInfo->h - mViewInfo->screen);
}
void TrackPanel::HandleCursorForLastMouseEvent()
{
HandleCursor(mLastMouseEvent);

View File

@ -225,6 +225,8 @@ class AUDACITY_DLL_API TrackPanel:public wxPanel {
virtual void HandleShiftKey(bool down);
virtual void HandleControlKey(bool down);
virtual void HandlePageUpKey();
virtual void HandlePageDownKey();
virtual AudacityProject * GetProject() const;
virtual void OnPrevTrack(bool shift = false);