do not scroll encounter tabs with wheel, set current species combo by index instead of text

This commit is contained in:
garak
2023-01-16 15:45:45 -05:00
committed by t
parent b5444ce803
commit 5c63dc9bbc
2 changed files with 6 additions and 2 deletions

View File

@@ -35,7 +35,7 @@ QWidget *SpeciesComboDelegate::createEditor(QWidget *parent, const QStyleOptionV
void SpeciesComboDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const {
QString species = index.data(Qt::EditRole).toString();
NoScrollComboBox *combo = static_cast<NoScrollComboBox *>(editor);
combo->setCurrentText(species);
combo->setCurrentIndex(combo->findText(species));
}
void SpeciesComboDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const {