Skip to content

Commit

Permalink
Backport PR #2949: delay callback when calling previous zoom (#3085)
Browse files Browse the repository at this point in the history
Co-authored-by: Kyle Conroy <kyleconroy@gmail.com>
  • Loading branch information
meeseeksmachine and kecnry authored Jul 11, 2024
1 parent 673593d commit f44909e
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 @@ -6,6 +6,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 @@ -149,7 +149,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 f44909e

Please # to comment.