mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
refs #649, further fixes and improvements
* call of non-virtual function in ctor * use getCopy * return number of merged models * change current simulator in model set loader (fixes infinite loop: change data -> signal -> change data).
This commit is contained in:
@@ -48,7 +48,7 @@ namespace BlackGui
|
||||
|
||||
// should be single simulator or no simulator (default)
|
||||
this->m_simulatorSelection.synchronize();
|
||||
const CSimulatorInfo simulator(this->m_simulatorSelection.get());
|
||||
const CSimulatorInfo simulator(this->m_simulatorSelection.getCopy());
|
||||
const bool s = this->initModelLoader(!simulator.isSingleSimulator() ? CSimulatorInfo(CSimulatorInfo::FSX) : simulator);
|
||||
if (s)
|
||||
{
|
||||
|
||||
@@ -103,8 +103,8 @@ namespace BlackGui
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CDbOwnModelsComponent> ui;
|
||||
std::unique_ptr<BlackMisc::Simulation::IAircraftModelLoader> m_modelLoader; //!< read own aircraft models
|
||||
BlackMisc::CData<BlackMisc::Simulation::Data::ModelCacheLastSelection> m_simulatorSelection {this }; //!< last selection
|
||||
std::unique_ptr<BlackMisc::Simulation::IAircraftModelLoader> m_modelLoader; //!< read own aircraft models
|
||||
BlackMisc::CData<BlackMisc::Simulation::Data::ModelCacheLastSelection> m_simulatorSelection {this }; //!< last selection
|
||||
|
||||
//! Init or change model loader
|
||||
bool initModelLoader(const BlackMisc::Simulation::CSimulatorInfo &simulator);
|
||||
@@ -126,8 +126,8 @@ namespace BlackGui
|
||||
virtual void customMenu(BlackGui::Menus::CMenuActions &menuActions) override;
|
||||
|
||||
private:
|
||||
QList<QAction *> m_loadActions; //!< load actions
|
||||
QList<QAction *> m_reloadActions; //!< reload actions
|
||||
QList<QAction *> m_loadActions; //!< load actions
|
||||
QList<QAction *> m_reloadActions; //!< reload actions
|
||||
};
|
||||
};
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user