1
0
Fork 0

Fix slow launcher diagram with bad airport data.

This commit is contained in:
James Turner 2017-03-16 22:41:59 +00:00
parent b13dd05aca
commit a1bc99ec84

View file

@ -587,6 +587,17 @@ void BaseDiagram::doComputeBounds()
void BaseDiagram::extendBounds(const QPointF& p)
{
// this check added after a bug where apt.dat reports SCSL as
// https://airportguide.com/airport/info/AG0003 (British Columbia)
// but the groundnet is for
// https://en.wikipedia.org/wiki/Salar_de_Atacama_Airport
// causing a rather large airport boundary.
QPointF v = (p - m_bounds.center());
if (v.manhattanLength() > 20000) {
qWarning() << "Excessively distant point" << p << v.manhattanLength();
return;
}
extendRect(m_bounds, p);
}