mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 05:28:09 +08:00
Ref T515, minor tweaks
This commit is contained in:
committed by
Mat Sutcliffe
parent
107464d92a
commit
5c1f6d9029
@@ -179,7 +179,7 @@ namespace BlackGui
|
||||
void CConsolidateWithDbDataMenu::customMenu(CMenuActions &menuActions)
|
||||
{
|
||||
const CAircraftModelView *mv = modelView();
|
||||
if (mv->isEmpty()) { this->nestedCustomMenu(menuActions); return; }
|
||||
if (!mv || mv->isEmpty()) { this->nestedCustomMenu(menuActions); return; }
|
||||
if (!sGui->hasWebDataServices()) { this->nestedCustomMenu(menuActions); return; }
|
||||
|
||||
menuActions.addMenuConsolidateModels();
|
||||
@@ -194,9 +194,7 @@ namespace BlackGui
|
||||
|
||||
void CConsolidateWithDbDataMenu::consolidateData()
|
||||
{
|
||||
BLACK_VERIFY_X(sGui, Q_FUNC_INFO, "Missing sGui");
|
||||
if (!sGui->hasWebDataServices()) { return; }
|
||||
|
||||
if (!sGui || sGui->isShuttingDown() || !sGui->hasWebDataServices()) { return; }
|
||||
const CAircraftModelList dbModels(sGui->getWebDataServices()->getModels());
|
||||
if (dbModels.isEmpty())
|
||||
{
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace BlackGui
|
||||
QAction *m_modelConverterX = nullptr;
|
||||
};
|
||||
|
||||
//! Merge with DB data
|
||||
//! Consolidate/merge with DB data
|
||||
class CConsolidateWithDbDataMenu : public IAircraftModelViewMenu
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace BlackGui
|
||||
int CAircraftModelView::applyToSelected(const CDistributor &distributor)
|
||||
{
|
||||
if (!hasSelection()) { return 0; }
|
||||
int c = this->updateSelected(CVariant::from(distributor), CAircraftModel::IndexDistributor);
|
||||
const int c = this->updateSelected(CVariant::from(distributor), CAircraftModel::IndexDistributor);
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user