diff --git a/Orange/widgets/utils/domaineditor.py b/Orange/widgets/utils/domaineditor.py index be92ce3ab4b..c9f013e5bdc 100644 --- a/Orange/widgets/utils/domaineditor.py +++ b/Orange/widgets/utils/domaineditor.py @@ -40,8 +40,8 @@ class VarTableModel(QAbstractTableModel): name2type = dict(zip(typenames, vartypes)) type2name = dict(zip(vartypes, typenames)) - def __init__(self, variables): - super().__init__() + def __init__(self, variables, *args): + super().__init__(*args) self.variables = variables def set_variables(self, variables): @@ -186,7 +186,8 @@ def __init__(self, widget): widget.contextOpened.connect(lambda: self.model().set_variables(self.variables)) widget.contextClosed.connect(lambda: self.model().set_variables([])) - self.setModel(VarTableModel(self.variables)) + self.setModel(VarTableModel(self.variables, self)) + self.setSelectionMode(QTableView.NoSelection) self.horizontalHeader().setStretchLastSection(True) self.setShowGrid(False)