diff --git a/pylot/core/util/dataprocessing.py b/pylot/core/util/dataprocessing.py index f2ded63a..9ada2df9 100644 --- a/pylot/core/util/dataprocessing.py +++ b/pylot/core/util/dataprocessing.py @@ -196,7 +196,7 @@ class Metadata(object): for network in inventory.networks: for station in network.stations: station_name = station.code - network_name = network_name.code + network_name = network.code if not station_name in self.stations_dict.keys(): st_id = '{}.{}'.format(network_name, station_name) self.stations_dict[st_id] = {'latitude': station[0].latitude, diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 618253bb..7af88575 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -1117,10 +1117,10 @@ class PylotCanvas(FigureCanvas): def saveFigure(self): if self.figure: fd = QtGui.QFileDialog() - fname, filter = fd.getSaveFileName(self.parent(), filter='Images (*.png)') + fname, filter = fd.getSaveFileName(self.parent(), filter='Images (*.png *.svg *.jpg)') if not fname: return - if not fname.endswith('.png'): + if not any([fname.endswith(item) for item in ['.png', '.svg', '.jpg']]): fname += '.png' self.figure.savefig(fname)