From 070c32e0073546011b4e17ff92333baf3eef5fad Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 23 Aug 2017 15:18:24 +0200 Subject: [PATCH] [change] disable multicursor by default --- QtPyLoT.py | 2 +- pylot/core/util/widgets.py | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/QtPyLoT.py b/QtPyLoT.py index 4f3222d2..e1129f3e 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -619,7 +619,7 @@ class MainWindow(QMainWindow): self.disconnectWFplotEvents() if str(settings.value('pyqtgraphic')) == 'false' or not pg: self.pg = False - self.dataPlot = PylotCanvas(parent=self, connect_events=False) + self.dataPlot = PylotCanvas(parent=self, connect_events=False, multicursor=True) self.dataPlot.updateWidget(xlab, None, plottitle) else: self.pg = True diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 46edfc87..e027eda6 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -594,7 +594,7 @@ class WaveformWidgetPG(QtGui.QWidget): class PylotCanvas(FigureCanvas): - def __init__(self, figure=None, parent=None, connect_events=True): + def __init__(self, figure=None, parent=None, connect_events=True, multicursor=False): self._parent = parent if not figure: @@ -607,10 +607,11 @@ class PylotCanvas(FigureCanvas): self.plotdict = dict() # initialize super class super(PylotCanvas, self).__init__(self.figure) - # add a cursor for station selection - self.multiCursor = MultiCursor(self.figure.canvas, (self.axes,), - horizOn=True, useblit=True, - color='m', lw=1) + if multicursor: + # add a cursor for station selection + self.multiCursor = MultiCursor(self.figure.canvas, (self.axes,), + horizOn=True, useblit=True, + color='m', lw=1) # update labels of the entire widget #self.updateWidget(xlabel, ylabel, title) @@ -955,7 +956,7 @@ class PickDlg(QDialog): self.stime, self.etime = full_range(self.getWFData()) # initialize plotting widget - self.multicompfig = PylotCanvas(parent=self, connect_events=False) + self.multicompfig = PylotCanvas(parent=self, connect_events=False, multicursor=True) self.phaseplot = PhasePlotWidget(self) self.phaseplot.hide()