mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-29 23:19:28 +02:00
Fix bug 187.
This commit is contained in:
parent
fbb6ed4fe6
commit
0d08f11504
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user