Skip to content

Commit

Permalink
Relink if ref data is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
rosteen committed Oct 9, 2023
1 parent 1120664 commit 794036b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions jdaviz/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2073,6 +2073,13 @@ def vue_data_item_remove(self, event):
self._reparent_subsets(data)

self.data_collection.remove(self.data_collection[event['item_name']])
if len(self.data_collection) > 1 and len(self.data_collection.external_links) == 0:
if self.config == "imviz":
link_type = self._jdaviz_helper.plugins["Links Control"].link_type.selected.lower()
self._jdaviz_helper.link_data(link_type=link_type, error_on_fail=True)
else:
for i in range(1, len(self.data_collection)):
self._link_new_data(data_to_be_linked=i)

Check warning on line 2082 in jdaviz/app.py

View check run for this annotation

Codecov / codecov/patch

jdaviz/app.py#L2082

Added line #L2082 was not covered by tests

def vue_close_snackbar_message(self, event):
"""
Expand Down

0 comments on commit 794036b

Please sign in to comment.