Formatting

This commit is contained in:
Klaus Basan
2018-05-25 21:22:00 +02:00
parent f80b2293f5
commit 464c8dfe83
11 changed files with 63 additions and 70 deletions

View File

@@ -135,24 +135,17 @@ namespace BlackCore
if (m_highlightedAircraft.isEmpty() || m_highlightEndTimeMsEpoch < 1) { return; }
m_blinkCycle = !m_blinkCycle;
if (QDateTime::currentMSecsSinceEpoch() < m_highlightEndTimeMsEpoch)
{
// blink mode, toggle aircraft
for (const CSimulatedAircraft &aircraft : as_const(m_highlightedAircraft))
{
if (m_blinkCycle)
{
this->callPhysicallyRemoveRemoteAircraft(aircraft.getCallsign());
}
else
{
this->callPhysicallyAddRemoteAircraft(aircraft); // blink
}
}
}
else
if (QDateTime::currentMSecsSinceEpoch() > m_highlightEndTimeMsEpoch)
{
this->stopHighlighting();
return;
}
// blink mode, toggle aircraft
for (const CSimulatedAircraft &aircraft : as_const(m_highlightedAircraft))
{
if (m_blinkCycle) { this->callPhysicallyRemoveRemoteAircraft(aircraft.getCallsign()); }
else { this->callPhysicallyAddRemoteAircraft(aircraft); }
}
}