Commit c6e64bcd authored by Lorenz Meier's avatar Lorenz Meier

Autopilot airframe plugin: Always offer a valid image

parent bf1dbe6c
......@@ -57,7 +57,11 @@ void AirframeComponentAirframes::insert(QString& group, QString& image, QString&
if (!rgAirframeTypes.contains(group)) {
g = new AirframeType_t;
g->name = group;
g->imageResource = QString("qrc:/qmlimages/").append(image);
if (image.length() > 0) {
g->imageResource = QString("qrc:/qmlimages/").append(image);
} else {
g->imageResource = QString("qrc:/qmlimages/AirframeStandardPlane.png");
}
qDebug() << "IMAGE:" << g->imageResource;
rgAirframeTypes.insert(group, g);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment