- temporary fix for comboboxes not finding the the value in the items when setting themselves with a value by defaulting to the first item in the list

This commit is contained in:
Marius Stanciu
2020-10-28 15:46:33 +02:00
committed by Marius
parent 9c97ce49b9
commit 86a931ace5
10 changed files with 80 additions and 36 deletions

View File

@@ -2131,7 +2131,10 @@ class FCComboBox(QtWidgets.QComboBox):
def set_value(self, val):
idx = self.findText(str(val))
self.setCurrentIndex(idx)
if idx == -1:
self.setCurrentIndex(0)
else:
self.setCurrentIndex(idx)
@property
def is_last(self):