Enable compare button only if automatic as well as manual picks are available for same stations.

This commit is contained in:
Ludger Küperkoch 2017-08-16 15:32:25 +02:00
parent 5d076511ec
commit 606dc6a596
2 changed files with 7 additions and 2 deletions

View File

@ -1477,7 +1477,12 @@ class MainWindow(QMainWindow):
if event.pylot_autopicks: if event.pylot_autopicks:
self.drawPicks(picktype='auto') self.drawPicks(picktype='auto')
if event.pylot_picks and event.pylot_autopicks: if event.pylot_picks and event.pylot_autopicks:
for key in event.pylot_picks:
for akey in event.pylot_autopicks:
if (akey == key) and (event.pylot_autopicks[akey]['P']['spe'] is not None \
or event.pylot_autopicks[akey]['S']['spe'] is not None):
self.compare_action.setEnabled(True) self.compare_action.setEnabled(True)
break
self.draw() self.draw()
def clearWaveformDataPlot(self): def clearWaveformDataPlot(self):

View File

@ -251,7 +251,7 @@ class PDFDictionary(object):
@classmethod @classmethod
def from_quakeml(self, fn): def from_quakeml(self, fn):
return PDFDictionary(fn) # LK TODO: check if stations are available with both automatic and manual picks return PDFDictionary(fn)
def get_all(self, phase): def get_all(self, phase):
rlist = list() rlist = list()