mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-19 09:01:15 +02:00
Global keyboard capture handling into new files, better comments...
... and break its compile dependency on CommandManager.h by letting it install callbacks. This also removes Objective-C mixed code from CommmandManager. This also eliminates four inclusions of Project.h! Capture handler state is also global, not per project, though the CommandManager's callbacks still do depend on the active project.
This commit is contained in:
@@ -171,7 +171,7 @@ different formats.
|
||||
#include "audacity/Types.h"
|
||||
#include "../AllThemeResources.h"
|
||||
#include "../AColor.h"
|
||||
#include "../Project.h"
|
||||
#include "../KeyboardCapture.h"
|
||||
#include "../TranslatableStringArray.h"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -1707,16 +1707,13 @@ void NumericTextCtrl::OnMouse(wxMouseEvent &event)
|
||||
|
||||
void NumericTextCtrl::OnFocus(wxFocusEvent &event)
|
||||
{
|
||||
if (event.GetEventType() == wxEVT_KILL_FOCUS) {
|
||||
AudacityProject::ReleaseKeyboard(this);
|
||||
}
|
||||
else {
|
||||
AudacityProject::CaptureKeyboard(this);
|
||||
if( mFocusedDigit <=0 )
|
||||
UpdateAutoFocus();
|
||||
}
|
||||
KeyboardCapture::OnFocus( *this, event );
|
||||
|
||||
Refresh(false);
|
||||
if (event.GetEventType() != wxEVT_KILL_FOCUS &&
|
||||
mFocusedDigit <= 0 )
|
||||
UpdateAutoFocus();
|
||||
|
||||
event.Skip( false ); // PRL: not sure why, but preserving old behavior
|
||||
}
|
||||
|
||||
void NumericTextCtrl::OnCaptureKey(wxCommandEvent &event)
|
||||
|
Reference in New Issue
Block a user