skip setting item as checkable for multiselection input

This commit is contained in:
iLLiCiTiT 2020-09-23 10:50:46 +02:00
parent 028b754f59
commit b2cd99cbcc
2 changed files with 2 additions and 10 deletions

View file

@ -1121,11 +1121,6 @@ class EnumeratorWidget(QtWidgets.QWidget, InputObject):
self.input_field.addItem(label, value)
self._first_value = first_value
if self.multiselection:
model = self.input_field.model()
for idx in range(self.input_field.count()):
model.item(idx).setCheckable(True)
layout.addWidget(self.input_field, 0)
self.setFocusProxy(self.input_field)

View file

@ -117,7 +117,6 @@ class MultiSelectionComboBox(QtWidgets.QComboBox):
or not self.view().rect().contains(event.pos())
or not index_flags & QtCore.Qt.ItemIsSelectable
or not index_flags & QtCore.Qt.ItemIsEnabled
or not index_flags & QtCore.Qt.ItemIsUserCheckable
):
return
@ -309,11 +308,9 @@ class MultiSelectionComboBox(QtWidgets.QComboBox):
event.key() == QtCore.Qt.Key_Down
and event.modifiers() & QtCore.Qt.AltModifier
):
self.showPopup()
return
return self.showPopup()
if event.key() in self.ignored_keys:
event.ignore()
return
return event.ignore()
return super(MultiSelectionComboBox, self).keyPressEvent(event)