mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
refs #626, fixes
* verify to notice when data is mssing (temp) * use getCopy
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "blackgui/menus/aircraftmodelmenus.h"
|
||||
#include "blackmisc/statusmessage.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/verify.h"
|
||||
#include "ui_dbownmodelscomponent.h"
|
||||
|
||||
using namespace BlackMisc;
|
||||
@@ -37,13 +38,17 @@ namespace BlackGui
|
||||
connect(ui->tvp_OwnAircraftModels, &CAircraftModelView::requestUpdate, this, &CDbOwnModelsComponent::ps_requestOwnModelsUpdate);
|
||||
|
||||
this->m_lastInteractions.synchronize();
|
||||
const CSimulatorInfo sim = this->m_lastInteractions.get().getLastSimulatorSelection();
|
||||
const CSimulatorInfo sim = this->m_lastInteractions.getCopy().getLastSimulatorSelection();
|
||||
if (sim.isSingleSimulator())
|
||||
{
|
||||
// if we have already use this before, use it again, but only from cache
|
||||
this->initModelLoader(sim);
|
||||
this->m_modelLoader->startLoading(IAircraftModelLoader::CacheOnly);
|
||||
}
|
||||
else
|
||||
{
|
||||
BLACK_VERIFY_X(false, Q_FUNC_INFO, "Missing sim");
|
||||
}
|
||||
|
||||
ui->tvp_OwnAircraftModels->setCustomMenu(new CMergeWithDbDataMenu(ui->tvp_OwnAircraftModels, this->modelLoader(), false));
|
||||
ui->tvp_OwnAircraftModels->setCustomMenu(new CLoadModelsMenu(this, true));
|
||||
|
||||
Reference in New Issue
Block a user