Feature request based on new VATSIM code of conduct, allow empty homebase

This commit is contained in:
Klaus Basan
2019-08-01 21:25:08 +02:00
committed by Roland Rossgotterer
parent fcfbda6cc7
commit 95abfc50c0
6 changed files with 31 additions and 2 deletions

View File

@@ -76,6 +76,11 @@ namespace BlackGui
return ui->le_Icao->text().trimmed().toUpper();
}
bool CAirportSmallCompleter::isEmpty() const
{
return ui->le_Icao->text().isEmpty();
}
void CAirportSmallCompleter::setReadOnly(bool readOnly)
{
ui->le_Icao->setReadOnly(readOnly);
@@ -88,6 +93,15 @@ namespace BlackGui
m_current = CAirport();
}
void CAirportSmallCompleter::clearIfInvalidCode(bool strictValidation)
{
const CAirportIcaoCode icao = this->getAirportIcaoCode();
if (!icao.hasValidIcaoCode(strictValidation))
{
this->clear();
}
}
void CAirportSmallCompleter::onIcaoChanged()
{
if (!sGui && !sGui->hasWebDataServices()) { return; }