entries: fix EnumerationEntry disable_scroll_wheel

This commit is contained in:
Simon Renblad 2024-04-11 11:20:22 +08:00 committed by Sébastien Bourdeauducq
parent c4892cf285
commit f9a447e8e0

View File

@ -202,7 +202,6 @@ class EnumerationEntry(QtWidgets.QWidget):
def __init__(self, argument): def __init__(self, argument):
QtWidgets.QWidget.__init__(self) QtWidgets.QWidget.__init__(self)
disable_scroll_wheel(self)
layout = QtWidgets.QHBoxLayout() layout = QtWidgets.QHBoxLayout()
self.setLayout(layout) self.setLayout(layout)
procdesc = argument["desc"] procdesc = argument["desc"]
@ -221,6 +220,7 @@ class EnumerationEntry(QtWidgets.QWidget):
self.btn_group.idClicked.connect(submit) self.btn_group.idClicked.connect(submit)
else: else:
self.combo_box = QtWidgets.QComboBox() self.combo_box = QtWidgets.QComboBox()
disable_scroll_wheel(self.combo_box)
self.combo_box.addItems(choices) self.combo_box.addItems(choices)
idx = choices.index(argument["state"]) idx = choices.index(argument["state"])
self.combo_box.setCurrentIndex(idx) self.combo_box.setCurrentIndex(idx)