[bugfix] information about deleted picks was not transferred to the

current event, thus not saved
This commit is contained in:
Marcel Paffrath 2019-02-28 16:20:21 +01:00
parent f0e2fdb470
commit 16b469ff67
3 changed files with 4 additions and 3 deletions

View File

@ -3311,7 +3311,6 @@ class MainWindow(QMainWindow):
event.dirty = False
self.tabs.setCurrentIndex(0) # implemented to prevent double-loading of waveform data
self.init_events(new=True)
self.setDirty(False)
self.init_metadata()
message = 'Opened project file {}.'.format(fnm)
@ -3321,6 +3320,7 @@ class MainWindow(QMainWindow):
self.init_array_tab()
self.set_metadata()
self.add2recentProjects(fnm)
self.setDirty(False)
def add2recentProjects(self, fnm):
settings = QtCore.QSettings()

View File

@ -88,6 +88,7 @@ class Array_map(QtGui.QWidget):
raise TypeError('Unknown "picker" {}'.format(picker))
print(message)
pyl_mw = self._parent
pyl_mw.addPicks(station, {}, type=picker)
pyl_mw.setDirty(True)
pyl_mw.update_status(message)
self._refresh_drawings()

View File

@ -1619,7 +1619,7 @@ class PickDlg(QDialog):
print('Warning: Could not init expected picks from taup: {}'.format(e))
self.activateArrivalsButton(False)
# init pick delete (with right click)
# init pick delete (with middle mouse click)
self.connect_pick_delete()
self.connect_mouse_motion()
self.setWindowTitle('Pickwindow on station: {}'.format(self.getStation()))
@ -2673,7 +2673,7 @@ class PickDlg(QDialog):
if pick_rel is None:
return
# delete the value from corresponding dictionary
allpicks[picktype].pop(phase)
removed_pick = allpicks[picktype].pop(phase)
# delete line from vlines dictionary
if phase in self.phaseLines.keys():
del (self.phaseLines[phase])