[locale] Filter zones combo always
The drop-down of zones was initially unfiltered, so you could start in Europe/Amsterdam and the zones drop-down would also show Australian zones; picking Perth would have weird effects, since Europe/Perth doesn't exist and so you'd end up in New York instead. - set the filtering region immediately, rather than only when the region changes.
This commit is contained in:
parent
83b2b95381
commit
e5b7e66ee9
@ -91,10 +91,16 @@ LocalePage::LocalePage( Config* config, QWidget* parent )
|
|||||||
|
|
||||||
// Set up the location before connecting signals, to avoid a signal
|
// Set up the location before connecting signals, to avoid a signal
|
||||||
// storm as various parts interact.
|
// storm as various parts interact.
|
||||||
m_regionCombo->setModel( m_config->regionModel() );
|
{
|
||||||
m_zoneCombo->setModel( m_config->regionalZonesModel() );
|
auto* regions = m_config->regionModel();
|
||||||
locationChanged( m_config->currentLocation() ); // doesn't inform TZ widget
|
auto* zones = m_config->regionalZonesModel();
|
||||||
m_tzWidget->setCurrentLocation( m_config->currentLocation() );
|
auto* location = m_config->currentLocation();
|
||||||
|
zones->setRegion( location->region() );
|
||||||
|
m_regionCombo->setModel( regions );
|
||||||
|
m_zoneCombo->setModel( zones );
|
||||||
|
m_tzWidget->setCurrentLocation( location );
|
||||||
|
locationChanged( location ); // doesn't inform TZ widget
|
||||||
|
}
|
||||||
|
|
||||||
connect( config, &Config::currentLCStatusChanged, m_formatsLabel, &QLabel::setText );
|
connect( config, &Config::currentLCStatusChanged, m_formatsLabel, &QLabel::setText );
|
||||||
connect( config, &Config::currentLanguageStatusChanged, m_localeLabel, &QLabel::setText );
|
connect( config, &Config::currentLanguageStatusChanged, m_localeLabel, &QLabel::setText );
|
||||||
|
Loading…
Reference in New Issue
Block a user