diff options
author | Luiz Agostini <luiz.agostini@openbossa.org> | 2009-11-09 23:47:13 -0300 |
---|---|---|
committer | Luiz Agostini <luiz.agostini@openbossa.org> | 2009-11-09 23:47:13 -0300 |
commit | 658f5c70b84d5ef8dec79472ac461d0e272137c5 (patch) | |
tree | 4c3230e2485c67a1bd424714684a36c2217c9962 /weather | |
parent | 8b6cb940381126438480db1cea91b902e3cf3d40 (diff) |
Weather: bug fixing.
Signed-off-by: Luiz Agostini <luiz.agostini@openbossa.org>
Diffstat (limited to 'weather')
-rw-r--r-- | weather/citycarroussel.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/weather/citycarroussel.cpp b/weather/citycarroussel.cpp index 0375b1a..b2323e2 100644 --- a/weather/citycarroussel.cpp +++ b/weather/citycarroussel.cpp @@ -387,15 +387,17 @@ void CityCarroussel::updateMainItem() { delete m_view; m_view = ForecastView::createView(m_data[0].type(), m_data[0].night()); - connect(m_cityInfo[0], SIGNAL(nameClicked()), this, SIGNAL(cityNameClicked())); - m_view->setPos(-m_positions[1], 0.0); - m_view->setZValue(10.0); - m_view->setParentItem(m_background[0]); - m_view->reset(); - - QAbstractAnimation * animation = m_view->getAnimation(); - if (animation) - animation->start(QAbstractAnimation::DeleteWhenStopped); + if (m_view) { + connect(m_cityInfo[0], SIGNAL(nameClicked()), this, SIGNAL(cityNameClicked())); + m_view->setPos(-m_positions[1], 0.0); + m_view->setZValue(10.0); + m_view->setParentItem(m_background[0]); + m_view->reset(); + + QAbstractAnimation * animation = m_view->getAnimation(); + if (animation) + animation->start(QAbstractAnimation::DeleteWhenStopped); + } } void CityCarroussel::updateBackground(int idx) |