| 91 | } |
| 92 | |
| 93 | bool NumValidatorBase::Validate(wxWindow *parent) |
| 94 | { |
| 95 | // If window is disabled, simply return |
| 96 | if ( !m_validatorWindow->IsEnabled() ) |
| 97 | return true; |
| 98 | |
| 99 | TranslatableString errmsg; |
| 100 | bool res = DoValidateNumber(&errmsg); |
| 101 | |
| 102 | if ( !res ) |
| 103 | { |
| 104 | AudacityMessageBox( |
| 105 | errmsg, |
| 106 | XO("Validation error"), |
| 107 | wxOK | wxICON_ERROR, |
| 108 | parent); |
| 109 | wxTextEntry *te = GetTextEntry(); |
| 110 | if ( te ) |
| 111 | { |
| 112 | te->SelectAll(); |
| 113 | m_validatorWindow->SetFocus(); |
| 114 | } |
| 115 | return false; |
| 116 | } |
| 117 | |
| 118 | return true; |
| 119 | } |
| 120 | |
| 121 | void |
| 122 | NumValidatorBase::GetCurrentValueAndInsertionPoint(wxString& val, |
nothing calls this directly
no test coverage detected