Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions fastplotlib/widgets/image_widget/_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,8 +942,10 @@ def set_data(
# make new graphic first
new_graphic = ImageGraphic(data=frame, name="image_widget_managed")

# set hlut tool to use new graphic
subplot.docks["right"]["histogram_lut"].image_graphic = new_graphic
if self._histogram_widget:
# set hlut tool to use new graphic
subplot.docks["right"]["histogram_lut"].image_graphic = new_graphic

# delete old graphic after setting hlut tool to new graphic
# this ensures gc
subplot.delete_graphic(graphic=subplot["image_widget_managed"])
Expand Down