Skip to content

Commit

Permalink
Backport PR spacetelescope#2479: bugfix for viewer rename when viewer…
Browse files Browse the repository at this point in the history
… ID is different from reference name
  • Loading branch information
bmorris3 committed Sep 27, 2023
1 parent c8c9408 commit df1207e
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 2 deletions.
61 changes: 61 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
3.7.1 (unreleased)
==================

New Features
------------

Cubeviz
^^^^^^^

Imviz
^^^^^

Mosviz
^^^^^^

Specviz
^^^^^^^

Specviz2d
^^^^^^^^^

API Changes
-----------

Cubeviz
^^^^^^^

Imviz
^^^^^

Mosviz
^^^^^^

Specviz
^^^^^^^

Specviz2d
^^^^^^^^^

Bug Fixes
---------

- Fixed bug which did not update all references to a viewer's ID when
updating a viewer's reference name. [#2479]

Cubeviz
^^^^^^^

Imviz
^^^^^

Mosviz
^^^^^^

Specviz
^^^^^^^

Specviz2d
^^^^^^^^^


3.7 (2023-09-21)
================

Expand Down
4 changes: 2 additions & 2 deletions jdaviz/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1655,11 +1655,11 @@ def _update_viewer_reference_name(
viewer_item['name'] = new_reference

# optionally update the viewer IDs:
if update_id and viewer_item['id'] == old_reference:
# update the id as well
if update_id:
old_id = viewer_item['id']
viewer_item['id'] = new_reference
self._viewer_store[new_reference] = self._viewer_store.pop(old_id)
self._viewer_store[new_reference]._reference_id = new_reference
self.state.viewer_icons[new_reference] = self.state.viewer_icons.pop(old_id)

# update the viewer name attributes on the helper:
Expand Down

0 comments on commit df1207e

Please sign in to comment.