Added second check to toggle locate button

When the User was using the continue to next station button the locate button did not get turned on every time while picking
This commit is contained in:
Jeldrik Gaal 2022-02-23 09:14:40 +01:00
parent a13defbe42
commit 13e0d8b106

View File

@ -2539,7 +2539,13 @@ class MainWindow(QMainWindow):
self.drawPicks(station) self.drawPicks(station)
self.draw() self.draw()
if self.nextStation: if self.nextStation:
if not self.get_loc_flag() and self.check4Loc():
self.locateEventAction.setEnabled(True)
self.set_loc_flag(True)
elif self.get_loc_flag() and not self.check4Loc():
self.set_loc_flag(False)
self.pickDialog(wfID - 1) self.pickDialog(wfID - 1)
else: else:
self.update_status('picks discarded ({0})'.format(station)) self.update_status('picks discarded ({0})'.format(station))
if not self.get_loc_flag() and self.check4Loc(): if not self.get_loc_flag() and self.check4Loc():