mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
refs #661, improved own model set handling
* fixed simulator selector * added simulator selector to own model set component * pinned last selections * fixed model cache to use "getCopy"
This commit is contained in:
@@ -59,7 +59,8 @@ namespace BlackMisc
|
||||
void CAircraftModelSetLoader::changeSimulator(const CSimulatorInfo &simulator)
|
||||
{
|
||||
Q_ASSERT_X(simulator.isSingleSimulator(), Q_FUNC_INFO, "Only one simulator per loader");
|
||||
this->m_caches.syncronizeCache(simulator);
|
||||
if (this->getSimulator() == simulator) { return; }
|
||||
this->m_caches.syncronizeCache(simulator); // also changes current simulator of caches
|
||||
emit simulatorChanged(simulator);
|
||||
}
|
||||
|
||||
@@ -74,6 +75,11 @@ namespace BlackMisc
|
||||
return this->m_caches.getCachedModels(simulator);
|
||||
}
|
||||
|
||||
int CAircraftModelSetLoader::getAircraftModelsCount() const
|
||||
{
|
||||
return getAircraftModels().size();
|
||||
}
|
||||
|
||||
CAircraftModel CAircraftModelSetLoader::getModelForModelString(const QString &modelString) const
|
||||
{
|
||||
if (modelString.isEmpty()) { return CAircraftModel(); }
|
||||
|
||||
Reference in New Issue
Block a user