Skip to content

Commit

Permalink
Merge pull request #1809 from astrofrog/unglue-multiple
Browse files Browse the repository at this point in the history
Make it possible to unglue multiple links in one go
  • Loading branch information
astrofrog authored Jul 4, 2018
2 parents 1c8e0b8 + 7ab96dd commit 49df805
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
11 changes: 4 additions & 7 deletions glue/dialogs/link_editor/qt/link_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
3 changes: 3 additions & 0 deletions glue/dialogs/link_editor/qt/link_editor.ui
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@
<height>0</height>
</size>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::MultiSelection</enum>
</property>
<column>
<property name="text">
<string>Function</string>
Expand Down

0 comments on commit 49df805

Please sign in to comment.