mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
refs #751, improved model writing to DB
* a pending request can be aborted when taking too long * success / directWrite flags in signals
This commit is contained in:
committed by
Roland Winklmeier
parent
ced9f5294e
commit
23ccb35ed8
@@ -595,9 +595,10 @@ namespace BlackGui
|
||||
emit this->tabIndexChanged(index);
|
||||
}
|
||||
|
||||
void CDbMappingComponent::ps_onModelsSuccessfullyPublished(const CAircraftModelList &models)
|
||||
void CDbMappingComponent::ps_onModelsSuccessfullyPublished(const CAircraftModelList &models, bool directWrite)
|
||||
{
|
||||
if (models.isEmpty()) { return; }
|
||||
if (!directWrite) { return; } // no models wwritten, but CRs
|
||||
emit this->requestUpdatedData(CEntityFlags::ModelEntity);
|
||||
}
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@ namespace BlackGui
|
||||
void ps_onStashedModelsDataChanged(int count, bool withFilter);
|
||||
|
||||
//! Models have been published successfully
|
||||
void ps_onModelsSuccessfullyPublished(const BlackMisc::Simulation::CAircraftModelList &models);
|
||||
void ps_onModelsSuccessfullyPublished(const BlackMisc::Simulation::CAircraftModelList &models, bool directWrite);
|
||||
|
||||
//! Stash drop request
|
||||
void ps_handleStashDropRequest(const BlackMisc::Aviation::CAirlineIcaoCode &code) const;
|
||||
|
||||
@@ -282,12 +282,12 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CDbStashComponent::ps_publishedModelsResponse(const CAircraftModelList &publishedModels, const CAircraftModelList &skippedModels, const CStatusMessageList &msgs)
|
||||
void CDbStashComponent::ps_publishedModelsResponse(const CAircraftModelList &publishedModels, const CAircraftModelList &skippedModels, const CStatusMessageList &msgs, bool success, bool directWrite)
|
||||
{
|
||||
ui->tvp_StashAircraftModels->hideLoadIndicator();
|
||||
if (!publishedModels.isEmpty())
|
||||
if (!publishedModels.isEmpty() && success)
|
||||
{
|
||||
emit this->modelsSuccessfullyPublished(publishedModels);
|
||||
emit this->modelsSuccessfullyPublished(publishedModels, directWrite);
|
||||
}
|
||||
|
||||
if (!msgs.isEmpty())
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace BlackGui
|
||||
void stashedModelsChanged();
|
||||
|
||||
//! Models succesfully published
|
||||
void modelsSuccessfullyPublished(const BlackMisc::Simulation::CAircraftModelList &publishedModels);
|
||||
void modelsSuccessfullyPublished(const BlackMisc::Simulation::CAircraftModelList &publishedModels, bool directWrite);
|
||||
|
||||
private slots:
|
||||
//! Unstash pressed
|
||||
@@ -152,7 +152,7 @@ namespace BlackGui
|
||||
//! Publish response received
|
||||
void ps_publishedModelsResponse(const BlackMisc::Simulation::CAircraftModelList &publishedModels,
|
||||
const BlackMisc::Simulation::CAircraftModelList &skippedModels,
|
||||
const BlackMisc::CStatusMessageList &msgs);
|
||||
const BlackMisc::CStatusMessageList &msgs, bool success, bool directWrite);
|
||||
|
||||
//! Copy over values
|
||||
void ps_copyOverPartsToSelected();
|
||||
|
||||
Reference in New Issue
Block a user