Merge branch 'develop' into feature/metadata_class

This commit is contained in:
Marcel Paffrath 2018-07-24 14:36:22 +02:00
commit 37e2e39f3a
2 changed files with 21 additions and 15 deletions

View File

@ -499,15 +499,15 @@ class MainWindow(QMainWindow):
# pickToolActions = (selectStation, )
# pickToolBar.setObjectName("PickTools")
# self.addActions(pickToolBar, pickToolActions)
self.locateEvent = self.createAction(parent=self, text='locate the event',
slot=self.locate_event,
shortcut='Alt+Ctrl+L',
icon=locate_icon,
tip='Locate the event using '
self.locateEventAction = self.createAction(parent=self, text='locate the event',
slot=self.locate_event,
shortcut='Alt+Ctrl+L',
icon=locate_icon,
tip='Locate the event using '
'the displayed manual arrivals.')
self.locateEvent.setEnabled(False)
self.locateEventAction.setEnabled(False)
locationToolActions = (self.locateEvent,)
locationToolActions = (self.locateEventAction,)
# add top menu
self.fileMenu = self.menuBar().addMenu('&File')
@ -1914,7 +1914,7 @@ class MainWindow(QMainWindow):
event = self.get_current_event()
if event.pylot_picks:
self.drawPicks(picktype='manual')
self.locateEvent.setEnabled(True)
self.locateEventAction.setEnabled(True)
self.qualities_action.setEnabled(True)
if event.pylot_autopicks:
self.drawPicks(picktype='auto')
@ -1985,6 +1985,9 @@ class MainWindow(QMainWindow):
self.openEventAction.setEnabled(False)
self.openEventsAutoAction.setEnabled(False)
self.loadpilotevent.setEnabled(False)
self.compare_action.setEnabled(False)
self.qualities_action.setEnabled(False)
self.locateEventAction.setEnabled(False)
if not refresh_plot:
self.wf_scroll_area.setVisible(False)
self.no_data_label.setVisible(True)
@ -2348,7 +2351,7 @@ class MainWindow(QMainWindow):
else:
self.update_status('picks discarded ({0})'.format(station))
if not self.get_loc_flag() and self.check4Loc():
self.locateEvent.setEnabled(True)
self.locateEventAction.setEnabled(True)
self.set_loc_flag(True)
elif self.get_loc_flag() and not self.check4Loc():
self.set_loc_flag(False)

View File

@ -2088,11 +2088,11 @@ class PickDlg(QDialog):
self.zoomAction.trigger()
self.multicompfig.disconnectEvents()
self.cidpress = self.multicompfig.connectPressEvent(self.setIniPick)
if not self.filterActionP.isChecked() and not self.filterActionS.isChecked():
if self.autoFilterAction.isChecked():
self.filterWFData()
else:
self.draw()
if self.autoFilterAction.isChecked():
for filteraction in [self.filterActionP, self.filterActionS]:
filteraction.setChecked(False)
self.filterWFData()
self.draw()
else:
self.draw()
# self.pick_block = self.togglePickBlocker()
@ -4957,6 +4957,9 @@ class FilterOptionsDialog(QDialog):
def checkMinMax(self):
returnvals = []
for foWidget in self.filterOptionWidgets.values():
if foWidget.filterOptions._filtertype in ['highpass', 'lowpass']:
returnvals.append(True)
continue
returnvals.append(foWidget.checkMin())
returnvals.append(foWidget.checkMax())
if all(returnvals):
@ -5015,7 +5018,7 @@ class FilterOptionsWidget(QWidget):
# self.getFilterOptions().getFreq()[1])
# else:
self.typeOptions = [None, "bandpass", "bandstop", "lowpass", "highpass"]
self.typeOptions = ["bandpass", "bandstop", "lowpass", "highpass"]
self.resetButton = QPushButton('Reset')
self.resetButton.setToolTip('Reset filter settings to settings for automatic picking.')