fixed: had to exit weather window to get new weather locations selectable
authorspiff <spiff@xbmc.org>
Tue, 15 Nov 2011 11:15:39 +0000 (12:15 +0100)
committerspiff <spiff@xbmc.org>
Tue, 15 Nov 2011 11:15:39 +0000 (12:15 +0100)
xbmc/windows/GUIWindowWeather.cpp

index 20ccfbd..9859911 100644 (file)
@@ -137,7 +137,6 @@ void CGUIWindowWeather::OnInitWindow()
 {
   // call UpdateButtons() so that we start with our initial stuff already present
   UpdateButtons();
-  m_maxLocation = strtol(GetProperty("Locations").asString().c_str(),0,10);
   UpdateLocations();
   CGUIWindow::OnInitWindow();
 }
@@ -145,6 +144,7 @@ void CGUIWindowWeather::OnInitWindow()
 void CGUIWindowWeather::UpdateLocations()
 {
   if (!IsActive()) return;
+  m_maxLocation = strtol(GetProperty("Locations").asString().c_str(),0,10);
 
   CGUIMessage msg(GUI_MSG_LABEL_RESET,GetID(),CONTROL_SELECTLOCATION);
   g_windowManager.SendMessage(msg);