diff --git a/bec_widgets/widgets/plots/image/image_base.py b/bec_widgets/widgets/plots/image/image_base.py index a160afc6..f079166e 100644 --- a/bec_widgets/widgets/plots/image/image_base.py +++ b/bec_widgets/widgets/plots/image/image_base.py @@ -123,7 +123,7 @@ class ImageLayerManager: z_position = self._get_bottom_z_position() image = ImageItem(parent_image=self.parent, object_name=name) image.setZValue(z_position) - image.removed.connect(lambda: self._remove_destroyed_layer(name)) + image.removed.connect(self._remove_destroyed_layer) self.layers[name] = ImageLayer(name=name, image=image, sync=sync) self.plot_item.addItem(image) diff --git a/bec_widgets/widgets/plots/image/image_item.py b/bec_widgets/widgets/plots/image/image_item.py index 360d2e72..072d1bc1 100644 --- a/bec_widgets/widgets/plots/image/image_item.py +++ b/bec_widgets/widgets/plots/image/image_item.py @@ -67,7 +67,7 @@ class ImageItem(BECConnector, pg.ImageItem): ] vRangeChangedManually = Signal(tuple) - removed = Signal() + removed = Signal(str) def __init__( self, @@ -277,4 +277,4 @@ class ImageItem(BECConnector, pg.ImageItem): self.clear() super().remove() if emit: - self.removed.emit() + self.removed.emit(self.objectName())