diff --git a/napari/components/_tests/test_viewer_model.py b/napari/components/_tests/test_viewer_model.py index 20d076ddb7b..a98b643ab51 100644 --- a/napari/components/_tests/test_viewer_model.py +++ b/napari/components/_tests/test_viewer_model.py @@ -85,6 +85,13 @@ def test_add_image_colormap_variants(): assert "did you mean to specify a 'channel_axis'" in str(err.value) +def test_add_image_accepts_all_arguments_as_sequence(): + """See https://github.com/napari/napari/pull/7089.""" + viewer = ViewerModel(ndisplay=3) + img = viewer.add_image(np.random.rand(2, 2)) + viewer.add_image(**img._get_state()) + + def test_add_volume(): """Test adding volume.""" viewer = ViewerModel(ndisplay=3) diff --git a/napari/components/viewer_model.py b/napari/components/viewer_model.py index 5c55da54f7b..1874928456d 100644 --- a/napari/components/viewer_model.py +++ b/napari/components/viewer_model.py @@ -962,6 +962,8 @@ def add_image( 'metadata', 'experimental_clipping_planes', 'custom_interpolation_kernel_2d', + 'axis_labels', + 'units', } if channel_axis is None: