From 81eafced2fbfccd42c2595e58a739d4a2c7978b5 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Thu, 3 Jul 2014 13:19:32 +0200 Subject: [PATCH] Don't allow to go next if the timezone view hasn't loaded. --- src/modules/locale/LocaleViewStep.cpp | 7 +++++-- src/modules/locale/LocaleViewStep.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/locale/LocaleViewStep.cpp b/src/modules/locale/LocaleViewStep.cpp index 700678d60..ebce74445 100644 --- a/src/modules/locale/LocaleViewStep.cpp +++ b/src/modules/locale/LocaleViewStep.cpp @@ -31,6 +31,7 @@ LocaleViewStep::LocaleViewStep( QObject* parent ) : Calamares::ViewStep( parent ) , m_widget( new QWidget() ) , m_actualWidget( new LocalePage() ) + , m_nextEnabled( false ) { QBoxLayout* mainLayout = new QHBoxLayout; m_widget->setLayout( mainLayout ); @@ -47,12 +48,14 @@ LocaleViewStep::LocaleViewStep( QObject* parent ) m_widget->layout()->removeWidget( waitingLabel ); waitingLabel->deleteLater(); m_widget->layout()->addWidget( m_actualWidget ); + m_nextEnabled = true; + emit nextStatusChanged( m_nextEnabled ); }); QFuture< void > initFuture = QtConcurrent::run( LocaleGlobal::init ); m_initWatcher.setFuture( initFuture ); - emit nextStatusChanged( true ); + emit nextStatusChanged( m_nextEnabled ); } @@ -93,7 +96,7 @@ LocaleViewStep::back() bool LocaleViewStep::isNextEnabled() const { - return true; + return m_nextEnabled; } diff --git a/src/modules/locale/LocaleViewStep.h b/src/modules/locale/LocaleViewStep.h index 0c9c97e33..02d7cf7a7 100644 --- a/src/modules/locale/LocaleViewStep.h +++ b/src/modules/locale/LocaleViewStep.h @@ -56,6 +56,7 @@ private: QFutureWatcher< void > m_initWatcher; LocalePage* m_actualWidget; + bool m_nextEnabled; }; #endif // LOCALEVIEWSTEP_H