Fix lazy-loaded thumbnail size for aircraft dirs.
This commit is contained in:
parent
5db1f5cad6
commit
b0fcd78e9f
1 changed files with 5 additions and 1 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue