Skip to content

Commit

Permalink
delay callback when calling previous zoom (#2949)
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry authored Jul 11, 2024
1 parent 8e2249b commit 73e54d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ Bug Fixes

- Fixes exporting the stretch histogram from Plot Options before the Plot Options plugin is ever opened. [#2934]

- Previous zoom tool is optimized to only issue one zoom update to the viewer. [#2949]

Cubeviz
^^^^^^^

Expand Down
3 changes: 2 additions & 1 deletion jdaviz/core/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ def activate(self):
return
prev_limits = self.viewer._prev_limits
self.save_prev_zoom()
self.viewer.state.x_min, self.viewer.state.x_max, self.viewer.state.y_min, self.viewer.state.y_max = prev_limits # noqa
with delay_callback(self.viewer.state, 'x_min', 'x_max', 'y_min', 'y_max'):
self.viewer.state.x_min, self.viewer.state.x_max, self.viewer.state.y_min, self.viewer.state.y_max = prev_limits # noqa


@viewer_tool
Expand Down

0 comments on commit 73e54d0

Please sign in to comment.