mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
refs #859, return bool flag if value was changed
This commit is contained in:
committed by
Mathew Sutcliffe
parent
63e2743867
commit
8b9b540c22
@@ -58,7 +58,7 @@ namespace BlackGui
|
||||
CDbAircraftIcaoSelectorComponent::~CDbAircraftIcaoSelectorComponent()
|
||||
{ }
|
||||
|
||||
void CDbAircraftIcaoSelectorComponent::setAircraftIcao(const CAircraftIcaoCode &icao)
|
||||
bool CDbAircraftIcaoSelectorComponent::setAircraftIcao(const CAircraftIcaoCode &icao)
|
||||
{
|
||||
CAircraftIcaoCode setIcao(icao);
|
||||
if (!icao.isLoadedFromDb())
|
||||
@@ -74,16 +74,25 @@ namespace BlackGui
|
||||
{
|
||||
m_currentIcao = setIcao;
|
||||
emit changedAircraftIcao(setIcao);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void CDbAircraftIcaoSelectorComponent::setAircraftIcao(int key)
|
||||
bool CDbAircraftIcaoSelectorComponent::setAircraftIcao(int key)
|
||||
{
|
||||
const CAircraftIcaoCode icao(sGui->getWebDataServices()->getAircraftIcaoCodeForDbKey(key));
|
||||
ui->lbl_Description->setText("");
|
||||
if (icao.hasCompleteData())
|
||||
{
|
||||
this->setAircraftIcao(icao);
|
||||
return this->setAircraftIcao(icao);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user