Skip to content

Commit

Permalink
Fix item selection in ItemListWidget to prevent non-selectable items …
Browse files Browse the repository at this point in the history
…from being selected

Fix #26
  • Loading branch information
PierreRaybaut committed Nov 26, 2024
1 parent 87d22ad commit f815ed2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

🛠️ Bug fixes:

* [Issue #26](https://github.com/PlotPyStack/PlotPy/issues/26) - Item list panel should not allow to select a non-selectable item

## Version 2.7.0 ##

Supported versions of Python have been updated (drop support for Python 3.8, add support for Python 3.13):
Expand Down
2 changes: 1 addition & 1 deletion plotpy/panels/itemlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def current_row_changed(self, index):

def selection_changed(self):
""" """
items = self.get_selected_items()
items = [item for item in self.get_selected_items() if item.can_select()]
self.plot.select_some_items(items)
self.plot.replot()

Expand Down

0 comments on commit f815ed2

Please sign in to comment.