Skip to content

Commit

Permalink
refresh when canvas_size_limits are changed (napari#6834)
Browse files Browse the repository at this point in the history
# References and relevant issues
If you change `canvas_size_limits` programmatically, nothing happens.
You need to interact with the canvas. 
This is a bit confusing when using a notebook, ipython, etc. because it
appears it doesn't work or the size limits are not correct.

# Description
Uses `self.node.update()` in ` _on_canvas_size_limits_change`

---------

Co-authored-by: Lorenzo Gaifas <[email protected]>
  • Loading branch information
psobolewskiPhD and brisvag authored May 6, 2024
1 parent 2fbfd1c commit 1dcbade
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions napari/_vispy/layers/points.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ def _on_canvas_size_limits_change(self):
low + scaled_highlight,
high + scaled_highlight,
)
self.node.update()

def reset(self):
super().reset()
Expand Down

0 comments on commit 1dcbade

Please sign in to comment.