mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-30 07:29:29 +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)
|
if (event.GetKeyCode() == WXK_CONTROL)
|
||||||
mTrackPanel->HandleControlKey(true);
|
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
|
// If a window has captured the keyboard, then allow it
|
||||||
// first dibs at the event. If it does an event.Skip(false)
|
// first dibs at the event. If it does an event.Skip(false)
|
||||||
// then allow the event to process as normal, bypassing the
|
// then allow the event to process as normal, bypassing the
|
||||||
|
@ -1375,6 +1375,16 @@ void TrackPanel::HandleControlKey(bool down)
|
|||||||
HandleCursorForLastMouseEvent();
|
HandleCursorForLastMouseEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TrackPanel::HandlePageUpKey()
|
||||||
|
{
|
||||||
|
mListener->TP_ScrollWindow(mViewInfo->h + mViewInfo->screen);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TrackPanel::HandlePageDownKey()
|
||||||
|
{
|
||||||
|
mListener->TP_ScrollWindow(mViewInfo->h - mViewInfo->screen);
|
||||||
|
}
|
||||||
|
|
||||||
void TrackPanel::HandleCursorForLastMouseEvent()
|
void TrackPanel::HandleCursorForLastMouseEvent()
|
||||||
{
|
{
|
||||||
HandleCursor(mLastMouseEvent);
|
HandleCursor(mLastMouseEvent);
|
||||||
|
@ -225,6 +225,8 @@ class AUDACITY_DLL_API TrackPanel:public wxPanel {
|
|||||||
|
|
||||||
virtual void HandleShiftKey(bool down);
|
virtual void HandleShiftKey(bool down);
|
||||||
virtual void HandleControlKey(bool down);
|
virtual void HandleControlKey(bool down);
|
||||||
|
virtual void HandlePageUpKey();
|
||||||
|
virtual void HandlePageDownKey();
|
||||||
virtual AudacityProject * GetProject() const;
|
virtual AudacityProject * GetProject() const;
|
||||||
|
|
||||||
virtual void OnPrevTrack(bool shift = false);
|
virtual void OnPrevTrack(bool shift = false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user