Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Orange/widgets/data/owtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,11 @@ def eventFilter(self, o, e):
return True # eat event
return False
table.efc = efc()
# disconnect default handler for clicks and connect a new one, which supports
# both selection and deselection of all data
btn.clicked.disconnect()
btn.installEventFilter(table.efc)
btn.clicked.connect(self._on_select_all)
table.btn = btn

if sys.platform == "darwin":
Expand All @@ -643,6 +647,14 @@ def eventFilter(self, o, e):
except Exception:
pass

def _on_select_all(self, _):
data_info = self.tabs.currentWidget()._input_slot.summary
if len(self.selected_rows) == data_info.len \
and len(self.selected_cols) == len(data_info.domain):
self.tabs.currentWidget().clearSelection()
else:
self.tabs.currentWidget().selectAll()

def _on_current_tab_changed(self, index):
"""Update the info box on current tab change"""
view = self.tabs.widget(index)
Expand Down