Repository: mne-tools/mne-python

Issue:
plot_sensors(kind='select') does not fill the list with selected channel names
For some reason interactive channel selection in `plot_sensors(kind='select')` does not update the returned list of selected channels.

### Reproducible example
Confirmed this on latest master:
```python
import mne
import os
from mne.datasets import multimodal

fname_raw = os.path.join(multimodal.data_path(), 'multimodal_raw.fif')
raw = mne.io.read_raw_fif(fname_raw)
```
now in interactive mode perform:
```python
fig, sel = raw.plot_sensors(kind='select')
```
select a few channels and see what happens to `sel` list - its empty.


Discussion:
What you describe is true in 0.20.8 and 0.21 as well as current master.  This works as expected:

```python
fig, sel = raw.plot_sensors(kind='select', block=True)
```

In light of that, what do you propose we should change?  Some ideas:

1. automatically set `block=True` when `kind == 'select'`
2. better documentation that `sel` will always be an empty list when `block=False`
3. something else?
Maybe this is specific to the notebook too - I never had to do `block=True` with `kind='select'` previously (in the notebook). I can take a look later today to check which version it worked in, but I think for 0.21 is works ok in the notebook. 
@mmagnuski anything to be done here?

From my above numbered options, after some thought I'm actually opposed to option 1, given that `plot_sensors` is now called from `plot_raw()` when channel names are right-clicked, and how I used `kind='select'` to get the correct sensor highlighted.  Admittedly that was a bit of a hack (setting it up as a selectable sensor plot, programmatically selecting the sensor to be highlighted, then disconnecting the interactivity before the figure is drawn), but unless/until `plot_sensors` is refactored, option 1 above would probably break some things. 
Ok, so currently the old behavior, where the list would update without blocking is not possible?
Then I'd consider throwing a warning when `kind='select'` and `block=False`.
> Ok, so currently the old behavior, where the list would update without blocking is not possible?

Well, you can still access it via `fig.lasso.selection`.  But actually, after digging around in the code, I think I know what changed. Previously I think the original `list` object created during init of the lasso selector was preserved throughout. That is no longer happening; in the `on_select` and `select_many` methods it's now getting rewritten instead of just appended, popped, etc.  I'll see if I can fix it.


Resolving patch:
diff --git a/mne/viz/utils.py b/mne/viz/utils.py
--- a/mne/viz/utils.py
+++ b/mne/viz/utils.py
@@ -2116,7 +2116,7 @@ def on_select(self, verts):
             inters = set(inds) - set(sels)
             inds = list(inters.union(set(sels) - set(inds)))
 
-        self.selection = np.array(self.ch_names)[inds].tolist()
+        self.selection[:] = np.array(self.ch_names)[inds].tolist()
         self.style_sensors(inds)
         self.canvas.callbacks.process('lasso_event')
 
@@ -2134,7 +2134,7 @@ def select_one(self, ind):
 
     def select_many(self, inds):
         """Select many sensors using indices (for predefined selections)."""
-        self.selection = np.array(self.ch_names)[inds].tolist()
+        self.selection[:] = np.array(self.ch_names)[inds].tolist()
         self.style_sensors(inds)
 
     def style_sensors(self, inds):


Test patch: