avoid weird behavior of the picking window

This commit is contained in:
Sebastian Wehling-Benatelli 2015-06-23 13:26:37 +02:00
parent 37e50b12e6
commit 2c9ad97a4a

View File

@ -25,7 +25,7 @@ from PySide.QtWebKit import QWebView
from obspy import Stream, UTCDateTime from obspy import Stream, UTCDateTime
from obspy.core.event import Pick, WaveformStreamID from obspy.core.event import Pick, WaveformStreamID
from pylot.core.read import FilterOptions from pylot.core.read import FilterOptions
from pylot.core.pick.utils import getSNR, earllatepicker from pylot.core.pick.utils import getSNR, earllatepicker, getnoisewin
from pylot.core.util.defaults import OUTPUTFORMATS from pylot.core.util.defaults import OUTPUTFORMATS
from pylot.core.util import prepTimeAxis, getGlobalTimes from pylot.core.util import prepTimeAxis, getGlobalTimes
@ -457,6 +457,8 @@ class PickDlg(QDialog):
# reset labels # reset labels
self.setPlotLabels() self.setPlotLabels()
self.draw()
def setPick(self, gui_event): def setPick(self, gui_event):
@ -507,7 +509,6 @@ class PickDlg(QDialog):
self.getPlotWidget().plotWFData(wfdata=self.getWFData(), self.getPlotWidget().plotWFData(wfdata=self.getWFData(),
title=self.getStation()) title=self.getStation())
self.drawPicks(phase) self.drawPicks(phase)
self.setPlotLabels()
self.disconnectPressEvent() self.disconnectPressEvent()
self.zoomAction.setEnabled(True) self.zoomAction.setEnabled(True)
self.selectPhase.setCurrentIndex(-1) self.selectPhase.setCurrentIndex(-1)
@ -517,8 +518,6 @@ class PickDlg(QDialog):
def drawPicks(self, phase=None): def drawPicks(self, phase=None):
# plotting picks # plotting picks
ax = self.getPlotWidget().axes ax = self.getPlotWidget().axes
ylims = ax.get_ylim()
ylims = self.getGlobalLimits('y') ylims = self.getGlobalLimits('y')
if self.getPicks(): if self.getPicks():
if phase is not None: if phase is not None:
@ -540,8 +539,6 @@ class PickDlg(QDialog):
[mpp, mpp], ylims, 'b-', [mpp, mpp], ylims, 'b-',
[mpp + spe, mpp + spe], ylims, 'c--') [mpp + spe, mpp + spe], ylims, 'c--')
self.getPlotWidget().draw()
def panPress(self, gui_event): def panPress(self, gui_event):
ax = self.getPlotWidget().axes ax = self.getPlotWidget().axes
if gui_event.inaxes != ax: return if gui_event.inaxes != ax: return