diff --git a/src/modules/locale/LocalePage.cpp b/src/modules/locale/LocalePage.cpp index b5de92b64..6b516efab 100644 --- a/src/modules/locale/LocalePage.cpp +++ b/src/modules/locale/LocalePage.cpp @@ -116,6 +116,8 @@ LocalePage::LocalePage( QWidget* parent ) if ( !m_blockTzWidgetSet ) m_tzWidget->setCurrentLocation( m_regionCombo->currentData().toString(), m_zoneCombo->currentData().toString() ); + + updateGlobalStorage(); } ); connect( m_tzWidget, &TimeZoneWidget::locationChanged, @@ -139,10 +141,7 @@ LocalePage::LocalePage( QWidget* parent ) m_blockTzWidgetSet = false; - Calamares::JobQueue::instance()->globalStorage() - ->insert( "locationRegion", location.region ); - Calamares::JobQueue::instance()->globalStorage() - ->insert( "locationZone", location.zone ); + updateGlobalStorage(); } ); connect( m_localeChangeButton, &QPushButton::clicked, @@ -370,3 +369,13 @@ LocalePage::prettyLCLocale( const QString& lcLocale ) localeString.remove( " UTF-8" ); return localeString; } + +void +LocalePage::updateGlobalStorage() +{ + LocaleGlobal::Location location = m_tzWidget->getCurrentLocation(); + Calamares::JobQueue::instance()->globalStorage() + ->insert( "locationRegion", location.region ); + Calamares::JobQueue::instance()->globalStorage() + ->insert( "locationZone", location.zone ); +} diff --git a/src/modules/locale/LocalePage.h b/src/modules/locale/LocalePage.h index a53a6ceec..4b2d5491d 100644 --- a/src/modules/locale/LocalePage.h +++ b/src/modules/locale/LocalePage.h @@ -50,6 +50,7 @@ public: private: QString guessLCLocale(); QString prettyLCLocale( const QString& lcLocale ); + void updateGlobalStorage(); TimeZoneWidget* m_tzWidget; QComboBox* m_regionCombo;