[bugfix] check for station in picks before plot

This commit is contained in:
Marcel Paffrath 2017-08-14 11:38:31 +02:00
parent 3c8ed2e44e
commit c20ea78e52

View File

@ -1921,11 +1921,17 @@ class MainWindow(QMainWindow):
self.drawPicks(station, 'manual') self.drawPicks(station, 'manual')
self.drawPicks(station, 'auto') self.drawPicks(station, 'auto')
return return
# if picks to draw not specified, draw all picks available # if picks to draw not specified, draw all picks available
if not station: if not station:
for station in self.getPicks(type=picktype): for station in self.getPicks(type=picktype):
self.drawPicks(station, picktype=picktype) self.drawPicks(station, picktype=picktype)
return return
# check for station key in dictionary, else return
if not station in self.getPicks(type=picktype):
return
# plotting picks # plotting picks
plotID = self.getStationID(station) plotID = self.getStationID(station)
if plotID is None: if plotID is None: