diff --git a/src/blackgui/components/dbownmodelsetcomponent.cpp b/src/blackgui/components/dbownmodelsetcomponent.cpp
index 1db96acdb..ab61b7a11 100644
--- a/src/blackgui/components/dbownmodelsetcomponent.cpp
+++ b/src/blackgui/components/dbownmodelsetcomponent.cpp
@@ -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());
diff --git a/src/blackgui/components/dbownmodelsetcomponent.h b/src/blackgui/components/dbownmodelsetcomponent.h
index 3c83e991c..4db6c5c67 100644
--- a/src/blackgui/components/dbownmodelsetcomponent.h
+++ b/src/blackgui/components/dbownmodelsetcomponent.h
@@ -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);
diff --git a/src/blackgui/editors/ownmodelsetform.cpp b/src/blackgui/editors/ownmodelsetform.cpp
index feb83185e..555a44529 100644
--- a/src/blackgui/editors/ownmodelsetform.cpp
+++ b/src/blackgui/editors/ownmodelsetform.cpp
@@ -163,8 +163,8 @@ namespace BlackGui
CDistributorList COwnModelSetForm::getDistributorsBasedOnOptions() const
{
- if (ui->rb_DistributorsAll->isChecked()) { return this->getAllDistributors(); }
- if (ui->rb_DistributorsSelected->isChecked()) { return this->getSelectedDistributors(); }
+ if (ui->rb_DistributorsAll->isChecked()) { return this->getAllDistributors(); }
+ if (ui->rb_DistributorsSelected->isChecked()) { return this->getSelectedDistributors(); }
if (ui->rb_DistributorsFromBelow->isChecked()) { return this->getShownDistributors(); }
Q_ASSERT_X(false, Q_FUNC_INFO, "Wrong option");
return CDistributorList();
diff --git a/src/blackgui/editors/ownmodelsetform.ui b/src/blackgui/editors/ownmodelsetform.ui
index 762de6840..75b34a7af 100644
--- a/src/blackgui/editors/ownmodelsetform.ui
+++ b/src/blackgui/editors/ownmodelsetform.ui
@@ -158,8 +158,11 @@
-
+
+ all distributors shown below
+
- all from below
+ all shown below
bg_Distributors
@@ -175,6 +178,9 @@
-
+
+ all selected distributors from below
+
selected from below
@@ -186,7 +192,7 @@
-
- all from below
+ all distributors
true
@@ -305,9 +311,9 @@
+
-