From 76c2f0a5c4bb7bba2e3e83e0eec9a7ecf8f09971 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Thu, 5 Jun 2014 13:46:24 +0200 Subject: [PATCH] refs #257, hooking up simulator and application/network context to display * text messages * status messages --- src/blackcore/context_runtime.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/blackcore/context_runtime.cpp b/src/blackcore/context_runtime.cpp index 12ad715d3..df6b8e800 100644 --- a/src/blackcore/context_runtime.cpp +++ b/src/blackcore/context_runtime.cpp @@ -439,6 +439,10 @@ namespace BlackCore c = connect(this->m_contextNetwork, &IContextNetwork::changedAircraftSituation, this->getCContextSimulator(), &CContextSimulator::addAircraftSituation); Q_ASSERT(c); + + c = connect(this->m_contextNetwork, &IContextNetwork::textMessagesReceived, + this->getCContextSimulator(), &CContextSimulator::textMessagesReceived); + Q_ASSERT(c); } // only if own aircraft running locally @@ -448,6 +452,18 @@ namespace BlackCore this->getCContextSimulator(), &CContextSimulator::updateCockpitFromContext); Q_ASSERT(c); } + + // only if own aircraft running locally + if (this->m_contextApplication && this->m_contextApplication->usingLocalObjects()) + { + c = connect(this->m_contextApplication, &IContextApplication::statusMessage, + this->getCContextSimulator(), &CContextSimulator::statusMessageReceived); + Q_ASSERT(c); + + c = connect(this->m_contextApplication, &IContextApplication::statusMessages, + this->getCContextSimulator(), &CContextSimulator::statusMessagesReceived); + Q_ASSERT(c); + } } if (this->m_contextNetwork && this->m_contextOwnAircraft && this->m_contextNetwork->usingLocalObjects() && this->m_contextOwnAircraft->usingLocalObjects())