From 6880761f7b34ce2ae5168768461bd998992ffbe7 Mon Sep 17 00:00:00 2001 From: James Turner Date: Thu, 16 Mar 2017 22:42:58 +0000 Subject: [PATCH] Launcher diagram: faster boundary computation. No need to completely rebuild in these cases. --- src/GUI/AirportDiagram.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/GUI/AirportDiagram.cxx b/src/GUI/AirportDiagram.cxx index 6e07fb94b..673151e8c 100644 --- a/src/GUI/AirportDiagram.cxx +++ b/src/GUI/AirportDiagram.cxx @@ -189,7 +189,8 @@ void AirportDiagram::addRunway(FGRunwayRef rwy) r.runway = rwy; m_runways.append(r); - recomputeBounds(false); + extendBounds(r.p1); + extendBounds(r.p2); update(); } @@ -224,7 +225,7 @@ void AirportDiagram::addParking(FGParkingRef park) { ParkingData pd = { project(park->geod()), park }; m_parking.push_back(pd); - recomputeBounds(false); + extendBounds(pd.pt); update(); } @@ -232,7 +233,7 @@ void AirportDiagram::addHelipad(FGHelipadRef pad) { HelipadData pd = { project(pad->geod()), pad }; m_helipads.push_back(pd); - recomputeBounds(false); + extendBounds(pd.pt); update(); }