mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
refs #395, changed own aircraft provider to thread safe member functions
(similar to remote aircraft provider)
* removed references
* made own aircraft context thread safe (reg. own aircrat data)
* removed the read only versions of the provider
* adjusted consuming methods
* renamed some functions ("ownAircraft...") to avoid ambiguity (with remote aircraft)
This commit is contained in:
committed by
Mathew Sutcliffe
parent
7200f2e29c
commit
3ecf37dda4
@@ -77,20 +77,20 @@ namespace BlackSimPlugin
|
||||
|
||||
void CSimulatorFsCommon::setOwnAircraftModel(const QString &modelName)
|
||||
{
|
||||
CAircraftModel model = ownAircraft().getModel();
|
||||
CAircraftModel model = getOwnAircraftModel();
|
||||
model.setModelString(modelName);
|
||||
this->setOwnAircraftModel(model);
|
||||
}
|
||||
|
||||
void CSimulatorFsCommon::setOwnAircraftModel(const BlackMisc::Simulation::CAircraftModel &model)
|
||||
{
|
||||
if (ownAircraft().getModel() != model)
|
||||
if (getOwnAircraftModel() != model)
|
||||
{
|
||||
CAircraftModel newModel(model);
|
||||
newModel.setModelType(CAircraftModel::TypeOwnSimulatorModel);
|
||||
CSimulatorFsCommon::reverseLookupIcaoData(newModel);
|
||||
ownAircraft().setModel(newModel);
|
||||
emit ownAircraftModelChanged(ownAircraft());
|
||||
updateOwnModel(newModel);
|
||||
emit ownAircraftModelChanged(getOwnAircraft());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user