mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
Update editor data when stashed data are modified (e.g. by drag and drop)
This issue was discovered during testing for #640
This commit is contained in:
@@ -42,9 +42,9 @@ namespace BlackGui
|
||||
CAircraftIcaoForm::~CAircraftIcaoForm()
|
||||
{ }
|
||||
|
||||
void CAircraftIcaoForm::setValue(const BlackMisc::Aviation::CAircraftIcaoCode &icao)
|
||||
bool CAircraftIcaoForm::setValue(const BlackMisc::Aviation::CAircraftIcaoCode &icao)
|
||||
{
|
||||
if (icao == this->m_originalCode) { return; }
|
||||
if (icao == this->m_originalCode) { return false; }
|
||||
this->m_originalCode = icao;
|
||||
|
||||
this->ui->le_Id->setText(icao.getDbKeyAsString());
|
||||
@@ -65,6 +65,7 @@ namespace BlackGui
|
||||
CGuiUtility::setComboBoxValueByStartingString(this->ui->cb_Wtc, wtc, "unspecified");
|
||||
|
||||
this->ui->le_Updated->setText(icao.getFormattedUtcTimestampYmdhms());
|
||||
return true;
|
||||
}
|
||||
|
||||
CAircraftIcaoCode CAircraftIcaoForm::getValue() const
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace BlackGui
|
||||
|
||||
public slots:
|
||||
//! Set value
|
||||
void setValue(const BlackMisc::Aviation::CAircraftIcaoCode &icao);
|
||||
bool setValue(const BlackMisc::Aviation::CAircraftIcaoCode &icao);
|
||||
|
||||
private slots:
|
||||
//! Variant has been dropped
|
||||
|
||||
@@ -39,13 +39,17 @@ namespace BlackGui
|
||||
CDistributorForm::~CDistributorForm()
|
||||
{ }
|
||||
|
||||
void CDistributorForm::setValue(const BlackMisc::Simulation::CDistributor &distributor)
|
||||
bool CDistributorForm::setValue(const BlackMisc::Simulation::CDistributor &distributor)
|
||||
{
|
||||
const CDistributor currentDistributor(this->getValue());
|
||||
if (currentDistributor == distributor) { return false; }
|
||||
|
||||
this->ui->distributor_Selector->setDistributor(distributor);
|
||||
this->ui->le_Description->setText(distributor.getDescription());
|
||||
this->ui->le_Alias1->setText(distributor.getAlias1());
|
||||
this->ui->le_Alias2->setText(distributor.getAlias2());
|
||||
this->ui->le_Updated->setText(distributor.getFormattedUtcTimestampYmdhms());
|
||||
return true;
|
||||
}
|
||||
|
||||
CDistributor CDistributorForm::getValue() const
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace BlackGui
|
||||
|
||||
public slots:
|
||||
//! Set value
|
||||
void setValue(const BlackMisc::Simulation::CDistributor &distributor = BlackMisc::Simulation::CDistributor());
|
||||
bool setValue(const BlackMisc::Simulation::CDistributor &distributor = BlackMisc::Simulation::CDistributor());
|
||||
|
||||
private slots:
|
||||
//! Variant has been dropped
|
||||
|
||||
@@ -67,9 +67,9 @@ namespace BlackGui
|
||||
return this->ui->editor_AirlineIcao->getValue();
|
||||
}
|
||||
|
||||
void CLiveryForm::setValue(const CLivery &livery)
|
||||
bool CLiveryForm::setValue(const CLivery &livery)
|
||||
{
|
||||
if (this->m_originalLivery == livery) { return; }
|
||||
if (this->m_originalLivery == livery) { return false; }
|
||||
|
||||
this->m_originalLivery = livery;
|
||||
this->ui->comp_LiverySelector->setLivery(livery);
|
||||
@@ -88,6 +88,7 @@ namespace BlackGui
|
||||
{
|
||||
this->ui->editor_AirlineIcao->setValue(livery.getAirlineIcaoCode());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
CStatusMessageList CLiveryForm::validate(bool withNestedForms) const
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace BlackGui
|
||||
|
||||
public slots:
|
||||
//! Value
|
||||
void setValue(const BlackMisc::Aviation::CLivery &livery);
|
||||
bool setValue(const BlackMisc::Aviation::CLivery &livery);
|
||||
|
||||
private slots:
|
||||
//! Livery dropped
|
||||
|
||||
Reference in New Issue
Block a user