From f4320b18c5f61e027d0636bdfb2f5e92127d690f Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Wed, 9 May 2018 01:46:19 +0200 Subject: [PATCH] Quick fix so model sets can be saved, see https://swift-project.slack.com/archives/G96QTUBEG/p1525815058000559 --- src/blackgui/components/dbownmodelsetcomponent.cpp | 6 +++--- src/blackgui/components/dbownmodelsetcomponent.h | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/blackgui/components/dbownmodelsetcomponent.cpp b/src/blackgui/components/dbownmodelsetcomponent.cpp index a2c33929d..55ad55dea 100644 --- a/src/blackgui/components/dbownmodelsetcomponent.cpp +++ b/src/blackgui/components/dbownmodelsetcomponent.cpp @@ -60,10 +60,10 @@ namespace BlackGui ui->tvp_OwnModelSet->menuAddItems(CAircraftModelView::MenuRemoveSelectedRows | CAircraftModelView::MenuClear); ui->tvp_OwnModelSet->menuAddItems(CAircraftModelView::MenuRemoveSelectedRows | CAircraftModelView::MenuMaterializeFilter); ui->tvp_OwnModelSet->addFilterDialog(); - ui->tvp_OwnModelSet->setCustomMenu(new CLoadModelsMenu(this)); + ui->tvp_OwnModelSet->setCustomMenu(new CLoadModelSetMenu(this)); ui->tvp_OwnModelSet->setCustomMenu(new CConsolidateWithDbDataMenu(ui->tvp_OwnModelSet, this, true)); ui->tvp_OwnModelSet->setCustomMenu(new CConsolidateWithSimulatorModels(ui->tvp_OwnModelSet, this, false)); - ui->tvp_OwnModelSet->menuAddItems(CAircraftModelView::MenuOrderable); + ui->tvp_OwnModelSet->menuAddItems(CAircraftModelView::MenuLoadAndSave); ui->tvp_OwnModelSet->setSorting(CAircraftModel::IndexOrderString); ui->tvp_OwnModelSet->initAsOrderable(); ui->tvp_OwnModelSet->setSimulatorForLoading(ui->comp_SimulatorSelector->getValue()); @@ -364,7 +364,7 @@ namespace BlackGui } } - void CDbOwnModelSetComponent::CLoadModelsMenu::customMenu(CMenuActions &menuActions) + void CDbOwnModelSetComponent::CLoadModelSetMenu::customMenu(CMenuActions &menuActions) { // for the moment I use all sims, I could restrict to CSimulatorInfo::getLocallyInstalledSimulators(); const CSimulatorInfo sims = CSimulatorInfo::allSimulators(); diff --git a/src/blackgui/components/dbownmodelsetcomponent.h b/src/blackgui/components/dbownmodelsetcomponent.h index 06dff8acc..92f5eeac4 100644 --- a/src/blackgui/components/dbownmodelsetcomponent.h +++ b/src/blackgui/components/dbownmodelsetcomponent.h @@ -160,14 +160,14 @@ namespace BlackGui // -------------------------- custom menus ----------------------------------- - //! The menu for loading and handling own models for mapping tasks - //! \note This is specific for that very component - class CLoadModelsMenu : public BlackGui::Menus::IMenuDelegate + //! The menu for loading models from cache or create a new model set + //! \note This is specific for that very model set component + class CLoadModelSetMenu : public Menus::IMenuDelegate { public: //! Constructor - CLoadModelsMenu(CDbOwnModelSetComponent *ownModelSetComponent, bool separator = true) : - BlackGui::Menus::IMenuDelegate(ownModelSetComponent, separator) + CLoadModelSetMenu(CDbOwnModelSetComponent *ownModelSetComponent, bool separator = true) : + Menus::IMenuDelegate(ownModelSetComponent, separator) {} //! \copydoc IMenuDelegate::customMenu