diff --git a/CHANGES.md b/CHANGES.md index 7f56775c3..faa1e9685 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -24,6 +24,8 @@ v0.14.0 (unreleased) - ``glue.viewers.common.qt.DataViewerWithState`` is now deprecated. +* Make it possible to unglue multiple links in one go. [#1809] + * Make it so that adding a subset to a viewer no longer adds the associated data, since in some cases the viewer can handle the subset size, but not the full data. [#1807] diff --git a/glue/dialogs/link_editor/qt/link_editor.py b/glue/dialogs/link_editor/qt/link_editor.py index f69c8e45e..d6b8041bb 100644 --- a/glue/dialogs/link_editor/qt/link_editor.py +++ b/glue/dialogs/link_editor/qt/link_editor.py @@ -127,14 +127,11 @@ def links(self): return self._links def _remove_link(self): - - current = self._ui.current_links.currentItem() - if current is None: + if self._ui.current_links.currentItem() is None: return - link = current.data(0, Qt.UserRole) - - self._links.remove(link) - + for item in self._ui.current_links.selectedItems(): + link = item.data(0, Qt.UserRole) + self._links.remove(link) self._ui.graph_widget.set_links(self._links) self._update_links_list() diff --git a/glue/dialogs/link_editor/qt/link_editor.ui b/glue/dialogs/link_editor/qt/link_editor.ui index da1a72930..ded807a8c 100644 --- a/glue/dialogs/link_editor/qt/link_editor.ui +++ b/glue/dialogs/link_editor/qt/link_editor.ui @@ -137,6 +137,9 @@ 0 + + QAbstractItemView::MultiSelection + Function