mirror of
https://github.com/huderlem/porymap.git
synced 2026-04-24 14:57:08 -05:00
Fix some species name issues for encounter table
This commit is contained in:
parent
d8d196b79d
commit
a7272191f4
|
|
@ -2611,7 +2611,7 @@ bool Project::readSpeciesIconPaths() {
|
|||
const QMap<QString, QString> iconIncbins = parser.readCIncbinMulti(incfilename);
|
||||
|
||||
// Read species constants. If this fails we can get them from the icon table (but we shouldn't rely on it).
|
||||
const QStringList prefixes = {projectConfig.getIdentifier(ProjectIdentifier::define_species_prefix)};
|
||||
const QStringList prefixes = {QString("\\b%1").arg(projectConfig.getIdentifier(ProjectIdentifier::define_species_prefix))};
|
||||
const QString constantsFilename = projectConfig.getFilePath(ProjectFilePath::constants_species);
|
||||
fileWatcher.addPath(root + "/" + constantsFilename);
|
||||
QStringList speciesNames = parser.readCDefineNames(constantsFilename, prefixes);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,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->setCurrentIndex(combo->findText(species));
|
||||
combo->setCurrentText(species);
|
||||
}
|
||||
|
||||
void SpeciesComboDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user