mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-11 06:25:33 +08:00
Avoid redundant update of model set ui
* added changed simulator in signal * only changed once when cache changed
This commit is contained in:
@@ -95,7 +95,7 @@ namespace BlackCore
|
||||
void renderRestrictionsChanged(bool restricted, bool enabled, int maxAircraft, const BlackMisc::PhysicalQuantities::CLength &maxRenderedDistance);
|
||||
|
||||
//! Model set ready or changed
|
||||
void modelSetChanged();
|
||||
void modelSetChanged(const BlackMisc::Simulation::CSimulatorInfo &simulator);
|
||||
|
||||
//! A single model has been matched for given aircraft
|
||||
void modelMatchingCompleted(const BlackMisc::Simulation::CSimulatedAircraft &aircraft);
|
||||
|
||||
@@ -68,7 +68,8 @@ namespace BlackCore
|
||||
this->restoreSimulatorPlugins();
|
||||
|
||||
connect(&m_weatherManager, &CWeatherManager::weatherGridReceived, this, &CContextSimulator::weatherGridReceived);
|
||||
connect(&m_modelSetLoader, &CAircraftModelSetLoader::simulatorChanged, this, &CContextSimulator::modelSetChanged);
|
||||
// seems to be redundant, as changed sim will cause changed cache
|
||||
// connect(&m_modelSetLoader, &CAircraftModelSetLoader::simulatorChanged, this, &CDigestSignal::modelSetChanged);
|
||||
connect(&m_modelSetLoader, &CAircraftModelSetLoader::cacheChanged, this, &CContextSimulator::modelSetChanged);
|
||||
|
||||
// deferred init of last model set, if no other data are set in meantime
|
||||
@@ -534,7 +535,7 @@ namespace BlackCore
|
||||
void CContextSimulator::onModelSetChanged(const CSimulatorInfo &simulator)
|
||||
{
|
||||
Q_UNUSED(simulator);
|
||||
emit this->modelSetChanged();
|
||||
emit this->modelSetChanged(simulator);
|
||||
}
|
||||
|
||||
void CContextSimulator::xCtxTextMessagesReceived(const Network::CTextMessageList &textMessages)
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace BlackCore
|
||||
"simulatorStatusChanged", this, SIGNAL(simulatorStatusChanged(int)));
|
||||
Q_ASSERT(s);
|
||||
s = connection.connect(serviceName, IContextSimulator::ObjectPath(), IContextSimulator::InterfaceName(),
|
||||
"modelSetChanged", this, SIGNAL(modelSetChanged()));
|
||||
"modelSetChanged", this, SIGNAL(modelSetChanged(BlackMisc::Simulation::CSimulatorInfo)));
|
||||
Q_ASSERT(s);
|
||||
s = connection.connect(serviceName, IContextSimulator::ObjectPath(), IContextSimulator::InterfaceName(),
|
||||
"ownAircraftModelChanged", this, SIGNAL(ownAircraftModelChanged(BlackMisc::Simulation::CAircraftModel)));
|
||||
|
||||
Reference in New Issue
Block a user