1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-03 14:13:11 +02:00

Bug 875 - First character is highlighted when tabbing into TimeText controls, not first non-zero character.

This commit is contained in:
James Crook 2018-04-09 15:51:18 +01:00
parent 8de9c53e9e
commit 7ab4b8c6df
2 changed files with 4 additions and 1 deletions

View File

@ -1625,9 +1625,12 @@ void NumericTextCtrl::OnFocus(wxFocusEvent &event)
{ {
if (event.GetEventType() == wxEVT_KILL_FOCUS) { if (event.GetEventType() == wxEVT_KILL_FOCUS) {
AudacityProject::ReleaseKeyboard(this); AudacityProject::ReleaseKeyboard(this);
mFocusedDigit =0;
} }
else { else {
AudacityProject::CaptureKeyboard(this); AudacityProject::CaptureKeyboard(this);
if( mFocusedDigit <=0 )
UpdateAutoFocus();
} }
Refresh(false); Refresh(false);

View File

@ -157,7 +157,7 @@ class NumericTextCtrl final : public wxControl, public NumericConverter
DECLARE_DYNAMIC_CLASS(NumericTextCtrl) DECLARE_DYNAMIC_CLASS(NumericTextCtrl)
struct Options { struct Options {
bool autoPos { false }; bool autoPos { true };
bool readOnly { false }; bool readOnly { false };
bool menuEnabled { true }; bool menuEnabled { true };
bool hasInvalidValue { false }; bool hasInvalidValue { false };