Only define the NavigationToolbar derived class if the necessary modules are installed.

pull/70/head
Christian Jacobs 2018-03-28 21:12:14 +01:00
rodzic d23dd54473
commit 7dd02c35c0
1 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -48,11 +48,11 @@ except ImportError:
logging.warning("Could not import the geocoder module!")
have_geocoder = False
class NavigationToolbar(NavigationToolbar2GTK3):
""" Navigation tools for the World Map. """
# Only include a subset of the tools.
toolitems = [t for t in NavigationToolbar2GTK3.toolitems if t[0] in ("Home", "Zoom", "Save")]
if(have_necessary_modules):
class NavigationToolbar(NavigationToolbar2GTK3):
""" Navigation tools for the World Map. """
# Only include a subset of the tools.
toolitems = [t for t in NavigationToolbar2GTK3.toolitems if t[0] in ("Home", "Zoom", "Save")]
class Point: