Refactor CContextSimulator::loadSimulatorPlugin

When a plugin is loaded, existing aircrafts should not be added
immediatly, but as soon as the simulator is simulating.
CContextSimulator also handles now the case that no simulator is
attached and all aircraft slots are now doing nothing instead of
raising an assert.

refs #549
This commit is contained in:
Roland Winklmeier
2016-07-14 15:58:00 +02:00
parent 3aee6174ac
commit c92a8ea32c
4 changed files with 37 additions and 54 deletions

View File

@@ -183,6 +183,9 @@ namespace BlackCore
//! Simulator avialable (driver available)?
bool isSimulatorAvailable() const { return BlackConfig::CBuildConfig::isCompiledWithFlightSimulatorSupport() && !getSimulatorPluginInfo().isUnspecified(); }
//! Is available simulator simulating? Returns false if no simulator is available
bool isSimulatorSimulating() const;
//! Icon representing the model
virtual BlackMisc::CPixmap iconForModel(const QString &modelString) const = 0;