1
0
Fork 0

Fix lazy-loaded thumbnail size for aircraft dirs.

This commit is contained in:
James Turner 2016-11-25 22:53:06 +00:00
parent 5db1f5cad6
commit b0fcd78e9f

View file

@ -627,7 +627,11 @@ QVariant AircraftItemModel::dataFromItem(AircraftItemPtr item, const DelegateSta
}
if (role == AircraftThumbnailSizeRole) {
return item->thumbnail(false).size();
QPixmap pm = item->thumbnail(false);
if (pm.isNull()) {
return QSize(STANDARD_THUMBNAIL_WIDTH, STANDARD_THUMBNAIL_HEIGHT);
}
return pm.size();
}
if ((role >= AircraftVariantDescriptionRole) && (role < AircraftThumbnailRole)) {