mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 09:15:34 +08:00
Fixed bug that could have caused X-Plane to stop displaying status messages.
This commit is contained in:
@@ -267,14 +267,14 @@ namespace BlackSimPlugin
|
|||||||
|
|
||||||
void CSimulatorXPlane::displayStatusMessage(const BlackMisc::CStatusMessage &message) const
|
void CSimulatorXPlane::displayStatusMessage(const BlackMisc::CStatusMessage &message) const
|
||||||
{
|
{
|
||||||
|
// No assert here as status message may come because of network problems
|
||||||
|
if (!isConnected()) { return; }
|
||||||
|
|
||||||
// avoid infinite recursion in case this function is called due to a message caused by this very function
|
// avoid infinite recursion in case this function is called due to a message caused by this very function
|
||||||
static bool isInFunction = false;
|
static bool isInFunction = false;
|
||||||
if (isInFunction) { return; }
|
if (isInFunction) { return; }
|
||||||
isInFunction = true;
|
isInFunction = true;
|
||||||
|
|
||||||
/* We do not assert here as status message may come because of network problems */
|
|
||||||
if (!isConnected()) { return; }
|
|
||||||
|
|
||||||
QColor color;
|
QColor color;
|
||||||
switch (message.getSeverity())
|
switch (message.getSeverity())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user