From 053caa5cf6727b26bf92ece77351bcd77e29ff9b Mon Sep 17 00:00:00 2001 From: Marcel Paffrath Date: Mon, 19 Jun 2017 10:37:24 +0200 Subject: [PATCH] [change] replot after manual picking only if necessary (picks changed) --- QtPyLoT.py | 14 ++++++++------ pylot/RELEASE-VERSION | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/QtPyLoT.py b/QtPyLoT.py index 97c2f11e..2a82046e 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -1626,8 +1626,14 @@ class MainWindow(QMainWindow): self.thread.quit() def addPicks(self, station, picks, type='manual'): - # stat_picks = self.getPicksOnStation(station, type) - # rval = False + stat_picks = self.getPicksOnStation(station, type) + if not stat_picks: + rval = False + else: + #set picks (ugly syntax?) + self.getPicks(type=type)[station] = picks + rval = True + return rval # if not stat_picks: # stat_picks = picks # else: @@ -1651,10 +1657,6 @@ class MainWindow(QMainWindow): # else: # raise Exception('FATAL: Should never occur!') # MP MP prompt redundant because new picks have to be accepted in the first place closing PickDlg - stat_picks = picks - rval = True - self.getPicks(type=type)[station] = stat_picks - return rval def updatePicks(self, type='manual'): picks = picksdict_from_picks(evt=self.get_data(type).get_evt_data()) diff --git a/pylot/RELEASE-VERSION b/pylot/RELEASE-VERSION index 0238003d..321e9d20 100644 --- a/pylot/RELEASE-VERSION +++ b/pylot/RELEASE-VERSION @@ -1 +1 @@ -7257-dirty +aea7-dirty