refs #576, no airline validation with color liveries and no exclusion of special designators

This commit is contained in:
Klaus Basan
2016-02-03 20:52:01 +01:00
parent 8cf31f7de8
commit 3096e9954e
7 changed files with 45 additions and 7 deletions

View File

@@ -79,16 +79,26 @@ namespace BlackGui
this->ui->color_Fuselage->setColor(livery.getColorFuselage());
this->ui->color_Tail->setColor(livery.getColorTail());
this->ui->editor_AirlineIcao->setValue(livery.getAirlineIcaoCode());
if (livery.isColorLivery())
{
this->ui->editor_AirlineIcao->clear();
}
else
{
this->ui->editor_AirlineIcao->setValue(livery.getAirlineIcaoCode());
}
}
CStatusMessageList CLiveryForm::validate(bool withNestedForms) const
{
CLivery livery(getValue());
CStatusMessageList msgs(livery.validate());
if (withNestedForms && (livery.hasValidDbKey() || !livery.getAirlineIcaoCodeDesignator().isEmpty()))
if (withNestedForms)
{
msgs.push_back(this->ui->editor_AirlineIcao->validate());
if (!livery.isColorLivery())
{
msgs.push_back(this->ui->editor_AirlineIcao->validate());
}
}
if (this->isReadOnly())
{