diff options
author | Luiz Agostini <luiz.agostini@openbossa.org> | 2009-11-13 16:11:39 -0300 |
---|---|---|
committer | Luiz Agostini <luiz.agostini@openbossa.org> | 2009-11-13 16:11:39 -0300 |
commit | 876bf81ec9b89e9f407a7a388cef29bd7785ed61 (patch) | |
tree | 84604ae0379d114fa109355c75a0c27d1229dc21 /weather | |
parent | 6d40c6f5654252df1720b7b8e9bf10a599e05a93 (diff) |
Weather: duplicated city bug fixing.
Signed-off-by: Luiz Agostini <luiz.agostini@openbossa.org>
Diffstat (limited to 'weather')
-rw-r--r-- | weather/addcitytool.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/weather/addcitytool.cpp b/weather/addcitytool.cpp index 7d8870c..9093372 100644 --- a/weather/addcitytool.cpp +++ b/weather/addcitytool.cpp @@ -367,6 +367,12 @@ void AddCityTool::errorScreenClosed() void AddCityTool::forecastReceived(const ForecastData &forecast) { + for (int i = 0; i < m_content.count(); ++i) + if (m_content[i].key() == forecast.key()) { + m_ErrorScreen->setCityName(forecast.cityName(), AddCityErrorScreen::AlreadyInList); + setCurrentScreen(m_ErrorScreen); + return; + } emit newForecast(forecast); setCurrentScreen(m_firstScreen); } |