diff options
Diffstat (limited to 'applets/clock/clock-location.c')
-rw-r--r-- | applets/clock/clock-location.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/applets/clock/clock-location.c b/applets/clock/clock-location.c index 1b81c517..efbc5939 100644 --- a/applets/clock/clock-location.c +++ b/applets/clock/clock-location.c @@ -676,8 +676,12 @@ update_weather_info (gpointer data) DISTANCE_UNIT_KM }; - prefs.temperature_unit = priv->temperature_unit; - prefs.speed_unit = priv->speed_unit; + // set temperature and speed units only if different from + // invalid/default + if (priv->temperature_unit > TEMP_UNIT_DEFAULT) + prefs.temperature_unit = priv->temperature_unit; + if (priv->speed_unit > SPEED_UNIT_DEFAULT) + prefs.speed_unit = priv->speed_unit; weather_info_abort (priv->weather_info); weather_info_update (priv->weather_info, |