fixed shift/control on lasso
This commit is contained in:
parent
cacb0a27b7
commit
ea4c0af6de
|
@ -1175,7 +1175,6 @@ class SelectPlotMode2 (PlotMode):
|
|||
def __init__(self, plot):
|
||||
PlotMode.__init__(self, plot, 'lassoselect',
|
||||
'Select within lasso', 'lasso')
|
||||
self._selectors = {}
|
||||
|
||||
def activate(self):
|
||||
self._button_press = self.canvas.mpl_connect(
|
||||
|
@ -1188,11 +1187,16 @@ class SelectPlotMode2 (PlotMode):
|
|||
def _on_select(self, event):
|
||||
if self.canvas.widgetlock.locked(): return
|
||||
if event.inaxes is None: return
|
||||
self.plot._lasso = Lasso(event.inaxes, (event.xdata, event.ydata), self.plot.lasso_select_callback)
|
||||
self.plot._lasso = Lasso(event.inaxes, (event.xdata, event.ydata), self.lasso_callback)
|
||||
self.plot._lasso.line.set_linewidth(1)
|
||||
self.plot._lasso.line.set_linestyle('--')
|
||||
# get a lock on the widget
|
||||
self.canvas.widgetlock(self.plot._lasso)
|
||||
self._event = event
|
||||
|
||||
def lasso_callback(self, verts):
|
||||
self.plot.lasso_select_callback(verts, self._event.key)
|
||||
|
||||
|
||||
class SelectPlotMode (PlotMode):
|
||||
def __init__(self, plot):
|
||||
|
|
Reference in New Issue