Fix libplaceview to avoid exception when mapservice is no longer present (#1193)

Fixes #12263
This commit is contained in:
Paul Culley 2021-05-06 10:19:03 -05:00 committed by GitHub
parent 9957506f35
commit bb7f5fa522
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,8 +206,10 @@ class PlaceBaseView(ListView):
"""
if action:
action.set_state(value)
self.mapservice = mapkey = value.get_string()
config.set('interface.mapservice', mapkey)
self.mapservice = value.get_string()
else:
self.mapservice = value
config.set('interface.mapservice', self.mapservice)
config.save()
_ui = self.__create_maps_menu_actions()
self.uimanager.add_ui_from_string(_ui)