1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-24 00:35:14 +03:00

Fix Issue 4057 for X9E also. (#4066)

This commit is contained in:
Jim Taylor 2016-11-22 12:19:40 -05:00 committed by Bertrand Songis
parent bda86d6e6a
commit 324addba2c
3 changed files with 4 additions and 4 deletions

View file

@ -337,7 +337,7 @@ bool AppPreferencesDialog::displayImage( QString fileName )
// Use the firmware name to determine splash width // Use the firmware name to determine splash width
int width = SPLASH_WIDTH; int width = SPLASH_WIDTH;
if (g.profile[g.id()].fwType().contains("x9d")) if (g.profile[g.id()].fwType().contains("x9"))
width = SPLASHX9D_WIDTH; width = SPLASHX9D_WIDTH;
ui->imageLabel->setPixmap( makePixMap( image, g.profile[g.id()].fwType())); ui->imageLabel->setPixmap( makePixMap( image, g.profile[g.id()].fwType()));

View file

@ -54,14 +54,14 @@ bool Side::displayImage( QString fileName, Source pictSource )
if (pictSource== PICT) if (pictSource== PICT)
*format = image.width()>WIDTH_9X ? LCDTARANIS : LCD9X; *format = image.width()>WIDTH_9X ? LCDTARANIS : LCD9X;
else if (pictSource == PROFILE) else if (pictSource == PROFILE)
*format = (g.profile[g.id()].fwType().contains("x9d")) ? LCDTARANIS : LCD9X; *format = (g.profile[g.id()].fwType().contains("x9")) ? LCDTARANIS : LCD9X;
} }
if (image.isNull()) { if (image.isNull()) {
return false; return false;
} }
// Load image // Load image
if (*format==LCDTARANIS) { if (*format==LCDTARANIS) {
imageLabel->setPixmap( makePixMap( image, "x9d" )); imageLabel->setPixmap( makePixMap( image, "x9" ));
imageLabel->setFixedSize(WIDTH_TARANIS*2, HEIGHT_TARANIS*2); imageLabel->setFixedSize(WIDTH_TARANIS*2, HEIGHT_TARANIS*2);
} }
else { else {

View file

@ -834,7 +834,7 @@ void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx)
QPixmap makePixMap( QImage image, QString firmwareType ) QPixmap makePixMap( QImage image, QString firmwareType )
{ {
if (firmwareType.contains( "x9d" )) { if (firmwareType.contains( "x9" )) {
image = image.convertToFormat(QImage::Format_RGB32); image = image.convertToFormat(QImage::Format_RGB32);
QRgb col; QRgb col;
int gray; int gray;