kopia lustrzana https://github.com/ctjacobs/pyqso
Only define the NavigationToolbar derived class if the necessary modules are installed.
rodzic
d23dd54473
commit
7dd02c35c0
|
@ -48,11 +48,11 @@ except ImportError:
|
||||||
logging.warning("Could not import the geocoder module!")
|
logging.warning("Could not import the geocoder module!")
|
||||||
have_geocoder = False
|
have_geocoder = False
|
||||||
|
|
||||||
|
if(have_necessary_modules):
|
||||||
class NavigationToolbar(NavigationToolbar2GTK3):
|
class NavigationToolbar(NavigationToolbar2GTK3):
|
||||||
""" Navigation tools for the World Map. """
|
""" Navigation tools for the World Map. """
|
||||||
# Only include a subset of the tools.
|
# Only include a subset of the tools.
|
||||||
toolitems = [t for t in NavigationToolbar2GTK3.toolitems if t[0] in ("Home", "Zoom", "Save")]
|
toolitems = [t for t in NavigationToolbar2GTK3.toolitems if t[0] in ("Home", "Zoom", "Save")]
|
||||||
|
|
||||||
|
|
||||||
class Point:
|
class Point:
|
||||||
|
|
Ładowanie…
Reference in New Issue