mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 01:45:38 +08:00
Some smaller mapping tool improvements
* allow to remove NON DB models (context menu) * renamed radio buttons
This commit is contained in:
committed by
Mat Sutcliffe
parent
7b8db694cc
commit
decdbb4432
@@ -342,6 +342,15 @@ namespace BlackGui
|
||||
this->setModelSet(models, simulator);
|
||||
}
|
||||
|
||||
void CDbOwnModelSetComponent::removeNonDBModels()
|
||||
{
|
||||
const CSimulatorInfo simulator = this->getModelSetSimulator();
|
||||
CAircraftModelList models = ui->tvp_OwnModelSet->containerOrFilteredContainer();
|
||||
const int r = models.removeObjectsWithoutDbKey();
|
||||
if (r < 1) { return; }
|
||||
this->setModelSet(models, simulator);
|
||||
}
|
||||
|
||||
void CDbOwnModelSetComponent::viewModelChanged()
|
||||
{
|
||||
const bool hasData = ui->tvp_OwnModelSet->rowCount() > 0;
|
||||
@@ -596,6 +605,10 @@ namespace BlackGui
|
||||
a = new QAction(CIcons::delete16(), "Remove excluded models", this);
|
||||
connect(a, &QAction::triggered, ownModelSetComp, &CDbOwnModelSetComponent::removeExcludedModels, Qt::QueuedConnection);
|
||||
m_setActions.append(a);
|
||||
|
||||
a = new QAction(CIcons::delete16(), "Remove non DB models", this);
|
||||
connect(a, &QAction::triggered, ownModelSetComp, &CDbOwnModelSetComponent::removeNonDBModels, Qt::QueuedConnection);
|
||||
m_setActions.append(a);
|
||||
}
|
||||
menuActions.addMenuModelSet();
|
||||
menuActions.addActions(m_setActions, CMenuAction::pathModelSet());
|
||||
|
||||
@@ -155,6 +155,9 @@ namespace BlackGui
|
||||
//! Remove excluded models
|
||||
void removeExcludedModels();
|
||||
|
||||
//! Remove NON DB models
|
||||
void removeNonDBModels();
|
||||
|
||||
//! Default file name
|
||||
void setSaveFileName(const BlackMisc::Simulation::CSimulatorInfo &simulator);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user