Always disable "Back" wxWizard button for the starting page.
Do it even if the start page has a previous page (e.g. because the wizard has been started in the middle for some reason). Closes #16535. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -271,6 +271,7 @@ void wxWizard::Init()
|
||||
{
|
||||
m_posWizard = wxDefaultPosition;
|
||||
m_page = NULL;
|
||||
m_firstpage = NULL;
|
||||
m_btnPrev = m_btnNext = NULL;
|
||||
m_statbmp = NULL;
|
||||
m_sizerBmpAndPage = NULL;
|
||||
@@ -620,7 +621,7 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward)
|
||||
|
||||
|
||||
// and update the buttons state
|
||||
m_btnPrev->Enable(HasPrevPage(m_page));
|
||||
m_btnPrev->Enable(m_page != m_firstpage);
|
||||
|
||||
const bool hasNext = HasNextPage(m_page);
|
||||
const wxString label = hasNext ? _("&Next >") : _("&Finish");
|
||||
@@ -687,6 +688,8 @@ bool wxWizard::RunWizard(wxWizardPage *firstPage)
|
||||
{
|
||||
wxCHECK_MSG( firstPage, false, wxT("can't run empty wizard") );
|
||||
|
||||
m_firstpage = firstPage;
|
||||
|
||||
// can't return false here because there is no old page
|
||||
(void)ShowPage(firstPage, true /* forward */);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user