[change] disable multicursor by default

This commit is contained in:
Marcel Paffrath 2017-08-23 15:18:24 +02:00
parent 1bbb686778
commit 070c32e007
2 changed files with 8 additions and 7 deletions

View File

@ -619,7 +619,7 @@ class MainWindow(QMainWindow):
self.disconnectWFplotEvents() self.disconnectWFplotEvents()
if str(settings.value('pyqtgraphic')) == 'false' or not pg: if str(settings.value('pyqtgraphic')) == 'false' or not pg:
self.pg = False 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) self.dataPlot.updateWidget(xlab, None, plottitle)
else: else:
self.pg = True self.pg = True

View File

@ -594,7 +594,7 @@ class WaveformWidgetPG(QtGui.QWidget):
class PylotCanvas(FigureCanvas): 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 self._parent = parent
if not figure: if not figure:
@ -607,10 +607,11 @@ class PylotCanvas(FigureCanvas):
self.plotdict = dict() self.plotdict = dict()
# initialize super class # initialize super class
super(PylotCanvas, self).__init__(self.figure) super(PylotCanvas, self).__init__(self.figure)
# add a cursor for station selection if multicursor:
self.multiCursor = MultiCursor(self.figure.canvas, (self.axes,), # add a cursor for station selection
horizOn=True, useblit=True, self.multiCursor = MultiCursor(self.figure.canvas, (self.axes,),
color='m', lw=1) horizOn=True, useblit=True,
color='m', lw=1)
# update labels of the entire widget # update labels of the entire widget
#self.updateWidget(xlabel, ylabel, title) #self.updateWidget(xlabel, ylabel, title)
@ -955,7 +956,7 @@ class PickDlg(QDialog):
self.stime, self.etime = full_range(self.getWFData()) self.stime, self.etime = full_range(self.getWFData())
# initialize plotting widget # 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 = PhasePlotWidget(self)
self.phaseplot.hide() self.phaseplot.hide()