1
0
Fork 0

Launcher: improve hit-testing of helipad

Use the other circle only, for hit testing pads in the airport diagram.
This commit is contained in:
James Turner 2020-07-15 09:52:02 +01:00
parent f105e8dfb2
commit dc4201ed9f
2 changed files with 5 additions and 2 deletions

View file

@ -107,6 +107,9 @@ AirportDiagram::AirportDiagram(QQuickItem* pr) :
m_parkingIconLeftPath.lineTo(16, 16);
m_parkingIconLeftPath.lineTo(0, 0);
m_helipadBoundsPath.moveTo(0, 0);
m_helipadBoundsPath.addEllipse(QPointF(0, 0), 16.0, 16.0);
m_helipadIconPath.moveTo(0,0);
m_helipadIconPath.addEllipse(QPointF(0, 0), 16.0, 16.0);
m_helipadIconPath.addEllipse(QPointF(0, 0), 13.0, 13.0);
@ -638,7 +641,7 @@ QPainterPath AirportDiagram::pathForHelipad(const HelipadData& h, const QTransfo
{
QTransform x = t;
x.translate(h.pt.x(), h.pt.y());
return x.map(m_helipadIconPath);
return x.map(m_helipadBoundsPath);
}
void AirportDiagram::buildTaxiways()

View file

@ -142,7 +142,7 @@ private:
QuantityValue m_approachDistance;
bool m_approachExtensionEnabled = false;
QPainterPath m_helipadIconPath;
QPainterPath m_helipadIconPath, m_helipadBoundsPath;
FGPositionedRef m_selection;
};