[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()
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

View File

@ -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()