diff --git a/clientgui/WizardAttach.cpp b/clientgui/WizardAttach.cpp index ab59e199c5..7beaa8a5b0 100644 --- a/clientgui/WizardAttach.cpp +++ b/clientgui/WizardAttach.cpp @@ -643,28 +643,6 @@ void CWizardAttach::_ProcessCancelEvent( wxWizardExEvent& event ) { GetNextButton()->Enable(); GetBackButton()->Enable(); - // Page specific rules - Disable the validator(s) - if (wxYES == iRetVal) { - if ((page == m_ProjectInfoPage) || (page == m_AccountManagerInfoPage)) { - m_ProjectInfoPage->m_pProjectURLCtrl->SetValidator(wxDefaultValidator); - } else if (page == m_AccountInfoPage) { - m_AccountInfoPage->m_pAccountEmailAddressCtrl->SetValidator(wxDefaultValidator); - m_AccountInfoPage->m_pAccountPasswordCtrl->SetValidator(wxDefaultValidator); - if (IsAttachToProjectWizard) { - m_AccountInfoPage->m_pAccountConfirmPasswordCtrl->SetValidator(wxDefaultValidator); - } - } else if (page == m_ErrProxyPage) { - m_ErrProxyPage->m_pProxyHTTPServerCtrl->SetValidator(wxDefaultValidator); - m_ErrProxyPage->m_pProxyHTTPPortCtrl->SetValidator(wxDefaultValidator); - m_ErrProxyPage->m_pProxyHTTPUsernameCtrl->SetValidator(wxDefaultValidator); - m_ErrProxyPage->m_pProxyHTTPPasswordCtrl->SetValidator(wxDefaultValidator); - m_ErrProxyPage->m_pProxySOCKSServerCtrl->SetValidator(wxDefaultValidator); - m_ErrProxyPage->m_pProxySOCKSPortCtrl->SetValidator(wxDefaultValidator); - m_ErrProxyPage->m_pProxySOCKSUsernameCtrl->SetValidator(wxDefaultValidator); - m_ErrProxyPage->m_pProxySOCKSPasswordCtrl->SetValidator(wxDefaultValidator); - } - } - // Generic rules bCancelWithoutNextPage |= (page == m_ErrNotDetectedPage); bCancelWithoutNextPage |= (page == m_ErrUnavailablePage); @@ -675,6 +653,7 @@ void CWizardAttach::_ProcessCancelEvent( wxWizardExEvent& event ) { } else { bCancelWithoutNextPage |= (page == m_WelcomePage); } + if (wxYES != iRetVal) { event.Veto(); m_bCancelInProgress = false;