mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
Avoid scaling for null pixmaps (results in warnings)
This commit is contained in:
@@ -167,9 +167,17 @@ namespace BlackGui
|
||||
}
|
||||
|
||||
this->ui->lbl_Image->setText("");
|
||||
this->ui->lbl_Image->setPixmap(
|
||||
image.scaled(sizeAvailable, Qt::KeepAspectRatio, Qt::FastTransformation)
|
||||
);
|
||||
if (image.isNull())
|
||||
{
|
||||
static const QPixmap e;
|
||||
this->ui->lbl_Image->setPixmap(e);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->ui->lbl_Image->setPixmap(
|
||||
image.scaled(sizeAvailable, Qt::KeepAspectRatio, Qt::FastTransformation)
|
||||
);
|
||||
}
|
||||
this->display(timeOutMs);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user