mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 03:15:34 +08:00
Feature request based on new VATSIM code of conduct, allow empty homebase
This commit is contained in:
committed by
Mat Sutcliffe
parent
4030a1a730
commit
740cb5a536
@@ -122,7 +122,8 @@ namespace BlackGui
|
||||
ui->lblp_Id->setTicked(validId);
|
||||
if (!validId) { msgs.push_back(CStatusMessage(this).validationError(u"Invalid id")); }
|
||||
|
||||
const bool validHomeAirport = user.hasValidHomeBase();
|
||||
// check against user and if the data entry contains a valid code (or is empty)
|
||||
const bool validHomeAirport = user.hasValidOrEmptyHomeBase() && (ui->comp_HomeAirport->isEmpty() || ui->comp_HomeAirport->getAirportIcaoCode().hasValidIcaoCode(false));
|
||||
ui->lblp_HomeAirport->setTicked(validHomeAirport);
|
||||
if (!validHomeAirport) { msgs.push_back(CStatusMessage(this).validationError(u"Wromg home airport")); }
|
||||
|
||||
@@ -144,6 +145,7 @@ namespace BlackGui
|
||||
|
||||
void CPilotForm::doValidation()
|
||||
{
|
||||
// ui->comp_HomeAirport->clearIfInvalidCode(false);
|
||||
this->validate();
|
||||
}
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user