Repository: napari/napari

Issue:
Playing movie doesn't work for `zarr` and `dask` multiscale layers
## 🐛 Bug

When clicking the play button for a 3D+ multiscale layer whose data is `zarr` or `dask` arrays, the slider moves one frame and then playing stops.

When I did a git bisect I narrowed it down to #1951 commit 6f28b00.

## To Reproduce

```python
import napari
import dask.array as da
import zarr
import numpy as np

v = napari.Viewer()
data = np.random.random((200, 200, 200))
data2 = data[::2]
im = [zarr.array(d) for d in [data, data2]]
# also broken
# im = [da.array(d) for d in [data, data2]]
v.add_image(im)
napari.run()
```

## Expected behavior

Movie plays as normal.

## Environment

```
napari: 0.4.8rc4.dev8+gdeec4259
Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.10
System: Ubuntu 20.04.2 LTS
Python: 3.8.8 (default, Apr 13 2021, 19:58:26) [GCC 7.3.0]
Qt: 5.15.2
PyQt5: 5.15.4
NumPy: 1.20.2
SciPy: 1.6.3
Dask: 2021.04.1
VisPy: 0.6.6

OpenGL:
- GL version: 4.6.0 NVIDIA 460.73.01
- MAX_TEXTURE_SIZE: 32768

Screens:
- screen 1: resolution 1920x1080, scale 1.0
- screen 2: resolution 1920x515, scale 1.0

Plugins:
- console: 0.0.3
- napari-interactive-sentinel: 0.1.dev1+g701e802
- napari-sentinel-zip: 0.2.2
- nd2-reader: 0.0.4
- ome_zarr: 0.0.18
- scikit-image: 0.4.8rc4.dev8+gdeec4259
- svg: 0.1.5
```
Playing movie doesn't work for `zarr` and `dask` multiscale layers
## 🐛 Bug

When clicking the play button for a 3D+ multiscale layer whose data is `zarr` or `dask` arrays, the slider moves one frame and then playing stops.

When I did a git bisect I narrowed it down to #1951 commit 6f28b00.

## To Reproduce

```python
import napari
import dask.array as da
import zarr
import numpy as np

v = napari.Viewer()
data = np.random.random((200, 200, 200))
data2 = data[::2]
im = [zarr.array(d) for d in [data, data2]]
# also broken
# im = [da.array(d) for d in [data, data2]]
v.add_image(im)
napari.run()
```

## Expected behavior

Movie plays as normal.

## Environment

```
napari: 0.4.8rc4.dev8+gdeec4259
Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.10
System: Ubuntu 20.04.2 LTS
Python: 3.8.8 (default, Apr 13 2021, 19:58:26) [GCC 7.3.0]
Qt: 5.15.2
PyQt5: 5.15.4
NumPy: 1.20.2
SciPy: 1.6.3
Dask: 2021.04.1
VisPy: 0.6.6

OpenGL:
- GL version: 4.6.0 NVIDIA 460.73.01
- MAX_TEXTURE_SIZE: 32768

Screens:
- screen 1: resolution 1920x1080, scale 1.0
- screen 2: resolution 1920x515, scale 1.0

Plugins:
- console: 0.0.3
- napari-interactive-sentinel: 0.1.dev1+g701e802
- napari-sentinel-zip: 0.2.2
- nd2-reader: 0.0.4
- ome_zarr: 0.0.18
- scikit-image: 0.4.8rc4.dev8+gdeec4259
- svg: 0.1.5
```


Discussion:

Resolving patch:
diff --git a/napari/_qt/qt_viewer.py b/napari/_qt/qt_viewer.py
--- a/napari/_qt/qt_viewer.py
+++ b/napari/_qt/qt_viewer.py
@@ -236,9 +236,6 @@ def __init__(self, viewer: Viewer, show_welcome_screen: bool = False):
         self.viewer.layers.events.inserted.connect(self._on_add_layer_change)
         self.viewer.layers.events.removed.connect(self._remove_layer)
 
-        # stop any animations whenever the layers change
-        self.viewer.events.layers_change.connect(lambda x: self.dims.stop())
-
         self.setAcceptDrops(True)
 
         for layer in self.viewer.layers:


Test patch: