From 0c71c7c23ff5a11867c840d751b0dde925077410 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 2 Apr 2020 12:36:45 +0200 Subject: [PATCH] [calamares] Set initial states of next, back buttons --- src/calamares/CalamaresWindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calamares/CalamaresWindow.cpp b/src/calamares/CalamaresWindow.cpp index 991d81dd3..9f35fbdf1 100644 --- a/src/calamares/CalamaresWindow.cpp +++ b/src/calamares/CalamaresWindow.cpp @@ -171,6 +171,7 @@ CalamaresWindow::getWidgetNavigation() { auto* back = new QPushButton( getButtonIcon( QStringLiteral( "go-previous" ) ), tr( "&Back" ), navigation ); back->setObjectName( "view-button-back" ); + back->setEnabled( m_viewManager->backEnabled() ); connect( back, &QPushButton::clicked, m_viewManager, &Calamares::ViewManager::back ); connect( m_viewManager, &Calamares::ViewManager::backEnabledChanged, back, &QPushButton::setEnabled ); connect( m_viewManager, &Calamares::ViewManager::backLabelChanged, back, &QPushButton::setText ); @@ -182,6 +183,7 @@ CalamaresWindow::getWidgetNavigation() { auto* next = new QPushButton( getButtonIcon( QStringLiteral( "go-next" ) ), tr( "&Next" ), navigation ); next->setObjectName( "view-button-next" ); + next->setEnabled( m_viewManager->nextEnabled() ); connect( next, &QPushButton::clicked, m_viewManager, &Calamares::ViewManager::next ); connect( m_viewManager, &Calamares::ViewManager::nextEnabledChanged, next, &QPushButton::setEnabled ); connect( m_viewManager, &Calamares::ViewManager::nextLabelChanged, next, &QPushButton::setText );