mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-30 15:18:42 +02:00
Merge branch 'Escape-key'
This commit is contained in:
commit
c0506b479d
@ -1468,6 +1468,21 @@ void TrackPanel::MakeParentResize()
|
|||||||
mListener->TP_HandleResize();
|
mListener->TP_HandleResize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TrackPanel::HandleEscapeKey()
|
||||||
|
{
|
||||||
|
switch (mMouseCapture)
|
||||||
|
{
|
||||||
|
case IsZooming:
|
||||||
|
case IsVZooming:
|
||||||
|
SetCapturedTrack(NULL, IsUncaptured);
|
||||||
|
if (HasCapture())
|
||||||
|
ReleaseCapture();
|
||||||
|
return;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void TrackPanel::HandleAltKey(bool down)
|
void TrackPanel::HandleAltKey(bool down)
|
||||||
{
|
{
|
||||||
mLastMouseEvent.m_altDown = down;
|
mLastMouseEvent.m_altDown = down;
|
||||||
@ -5963,6 +5978,11 @@ void TrackPanel::OnKeyDown(wxKeyEvent & event)
|
|||||||
{
|
{
|
||||||
Track *t = GetFocusedTrack();
|
Track *t = GetFocusedTrack();
|
||||||
|
|
||||||
|
if (event.GetKeyCode() == WXK_ESCAPE) {
|
||||||
|
HandleEscapeKey();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
||||||
#ifdef SPECTRAL_EDITING_ESC_KEY
|
#ifdef SPECTRAL_EDITING_ESC_KEY
|
||||||
// Test for pinning and unpinning of the center frequency
|
// Test for pinning and unpinning of the center frequency
|
||||||
|
@ -208,6 +208,7 @@ class AUDACITY_DLL_API TrackPanel:public wxPanel {
|
|||||||
//virtual void SetSelectionFormat(int iformat)
|
//virtual void SetSelectionFormat(int iformat)
|
||||||
//virtual void SetSnapTo(int snapto)
|
//virtual void SetSnapTo(int snapto)
|
||||||
|
|
||||||
|
void HandleEscapeKey();
|
||||||
virtual void HandleAltKey(bool down);
|
virtual void HandleAltKey(bool down);
|
||||||
virtual void HandleShiftKey(bool down);
|
virtual void HandleShiftKey(bool down);
|
||||||
virtual void HandleControlKey(bool down);
|
virtual void HandleControlKey(bool down);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user