X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4fe5383d6c6463e16e2d5b6b5fefe311b33e128f..46f9bb9475c95ef7ce6420462253e9382006714c:/src/generic/wizard.cpp?ds=sidebyside diff --git a/src/generic/wizard.cpp b/src/generic/wizard.cpp index c6ff8dc19b..7981bf47aa 100644 --- a/src/generic/wizard.cpp +++ b/src/generic/wizard.cpp @@ -240,10 +240,14 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward) // and update the buttons state m_btnPrev->Enable(m_page->GetPrev() != (wxWizardPage *)NULL); - if ( btnLabelWasNext != (m_page->GetNext() != (wxWizardPage *)NULL) ) + bool hasNext = m_page->GetNext() != (wxWizardPage *)NULL; + if ( btnLabelWasNext != hasNext ) { // need to update - m_btnNext->SetLabel(btnLabelWasNext ? _("&Finish") : _("&Next >")); + if (btnLabelWasNext) + m_btnNext->SetLabel(_("&Finish")); + else + m_btnNext->SetLabel(_("&Next >")); } // nothing to do: the label was already correct