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:
@@ -77,6 +77,7 @@ All (GUI):
|
|||||||
- Use native renderer for drawing check boxes in wxPropertyGrid (Eran Ifrah).
|
- Use native renderer for drawing check boxes in wxPropertyGrid (Eran Ifrah).
|
||||||
- Fix drawing custom colours of wxEnumProperty items in wxPG (Artur Wieczorek).
|
- Fix drawing custom colours of wxEnumProperty items in wxPG (Artur Wieczorek).
|
||||||
- Add wxBitmap ctor from wxCursor.
|
- Add wxBitmap ctor from wxCursor.
|
||||||
|
- Always disable wxWizard "Back" button on the starting page (pmgrace30).
|
||||||
|
|
||||||
wxGTK:
|
wxGTK:
|
||||||
|
|
||||||
|
@@ -124,6 +124,7 @@ protected:
|
|||||||
|
|
||||||
// wizard state
|
// wizard state
|
||||||
wxWizardPage *m_page; // the current page or NULL
|
wxWizardPage *m_page; // the current page or NULL
|
||||||
|
wxWizardPage *m_firstpage; // the page RunWizard started on or NULL
|
||||||
wxBitmap m_bitmap; // the default bitmap to show
|
wxBitmap m_bitmap; // the default bitmap to show
|
||||||
|
|
||||||
// wizard controls
|
// wizard controls
|
||||||
|
@@ -271,6 +271,7 @@ void wxWizard::Init()
|
|||||||
{
|
{
|
||||||
m_posWizard = wxDefaultPosition;
|
m_posWizard = wxDefaultPosition;
|
||||||
m_page = NULL;
|
m_page = NULL;
|
||||||
|
m_firstpage = NULL;
|
||||||
m_btnPrev = m_btnNext = NULL;
|
m_btnPrev = m_btnNext = NULL;
|
||||||
m_statbmp = NULL;
|
m_statbmp = NULL;
|
||||||
m_sizerBmpAndPage = NULL;
|
m_sizerBmpAndPage = NULL;
|
||||||
@@ -620,7 +621,7 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward)
|
|||||||
|
|
||||||
|
|
||||||
// and update the buttons state
|
// 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 bool hasNext = HasNextPage(m_page);
|
||||||
const wxString label = hasNext ? _("&Next >") : _("&Finish");
|
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") );
|
wxCHECK_MSG( firstPage, false, wxT("can't run empty wizard") );
|
||||||
|
|
||||||
|
m_firstpage = firstPage;
|
||||||
|
|
||||||
// can't return false here because there is no old page
|
// can't return false here because there is no old page
|
||||||
(void)ShowPage(firstPage, true /* forward */);
|
(void)ShowPage(firstPage, true /* forward */);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user