1
0
Fork 0

Fallback when aircraft description is missing.

- avoids corrupted delegate display caused by asking for
  bounds of empty string.
This commit is contained in:
James Turner 2015-09-26 12:41:32 -05:00
parent a39df48772
commit ceebd59001

View file

@ -528,6 +528,10 @@ QVariant AircraftItemModel::dataFromItem(AircraftItemPtr item, quint32 variantIn
}
if (role == Qt::DisplayRole) {
if (item->description.isEmpty()) {
return tr("Missing description for: %1").arg(item->baseName());
}
return item->description;
} else if (role == Qt::DecorationRole) {
return item->thumbnail();