diff --git a/Orange/widgets/data/utils/tableview.py b/Orange/widgets/data/utils/tableview.py index f9c467ffd54..af19f03c475 100644 --- a/Orange/widgets/data/utils/tableview.py +++ b/Orange/widgets/data/utils/tableview.py @@ -62,8 +62,6 @@ def __init__(self, *args, **kwargs): self.__cornerButton = btn = self.findChild(QAbstractButton) self.__cornerButtonFilter = DataTableView.__CornerPainter(self) btn.installEventFilter(self.__cornerButtonFilter) - btn.clicked.disconnect(self.selectAll) - btn.clicked.connect(self.cornerButtonClicked) if sys.platform == "darwin": btn.setAttribute(Qt.WA_MacSmallSize) @@ -86,21 +84,6 @@ def cornerText(self): """Return the corner text.""" return self.__cornerText - def cornerButtonClicked(self): - model = self.model() - selection = self.selectionModel() - selection = selection.selection() - if len(selection) == 1: - srange = selection[0] - if srange.top() == 0 and srange.left() == 0 \ - and srange.right() == model.columnCount() - 1 \ - and srange.bottom() == model.rowCount() - 1: - self.clearSelection() - else: - self.selectAll() - else: - self.selectAll() - def source_model(model: QAbstractItemModel) -> Optional[QAbstractItemModel]: while isinstance(model, QAbstractProxyModel): diff --git a/Orange/widgets/data/utils/tests/test_tableview.py b/Orange/widgets/data/utils/tests/test_tableview.py index 110cbb7264c..8323aa06c6e 100644 --- a/Orange/widgets/data/utils/tests/test_tableview.py +++ b/Orange/widgets/data/utils/tests/test_tableview.py @@ -44,17 +44,6 @@ def test_tableview_empty_model(self): RichTableModel.Icon) view.grab() - def test_tableview_toggle_select_all(self): - view = RichTableView() - model = RichTableModel(self.data) - view.setModel(model) - b = view.findChild(QAbstractButton) - b.click() - self.assertEqual(len(view.selectionModel().selectedRows(0)), - model.rowCount()) - b.click() - self.assertEqual(len(view.selectionModel().selectedRows(0)), 0) - def test_selection(self): view = RichTableView() model = RichTableModel(self.data)