0002680: Crash when loading mapservice with syntax error

svn: r11989
This commit is contained in:
Benny Malengier 2009-02-14 22:20:53 +00:00
parent 9f2d425386
commit b3404586db

View File

@ -161,12 +161,13 @@ class PlaceView(PageView.ListView):
if not self.mapservicedata: if not self.mapservicedata:
return return
self.mapslistlabel = []
if not self.mapservice in self.mapservicedata: if not self.mapservice in self.mapservicedata:
#stored val no longer exists, use the first key instead #stored val no longer exists, use the first key instead
self.set_mapservice(self.mapservicedata.keys()[0]) self.set_mapservice(self.mapservicedata.keys()[0])
#store all gtk labels to be able to update label on selection change #store all gtk labels to be able to update label on selection change
self.mapslistlabel = []
for widget in widgets : for widget in widgets :
if isinstance(widget, gtk.MenuToolButton): if isinstance(widget, gtk.MenuToolButton):
widget.set_menu(mmenu) widget.set_menu(mmenu)