Skip to content

Commit f815ed2

Browse files
committed
Fix item selection in ItemListWidget to prevent non-selectable items from being selected
Fix #26
1 parent 87d22ad commit f815ed2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
🛠️ Bug fixes:
66

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

911
Supported versions of Python have been updated (drop support for Python 3.8, add support for Python 3.13):

plotpy/panels/itemlist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def current_row_changed(self, index):
198198

199199
def selection_changed(self):
200200
""" """
201-
items = self.get_selected_items()
201+
items = [item for item in self.get_selected_items() if item.can_select()]
202202
self.plot.select_some_items(items)
203203
self.plot.replot()
204204

0 commit comments

Comments
 (0)