Skip to content

Commit 449cfa5

Browse files
committed
Fixed inconsistent highlight of active leg after flight plan change.
1 parent 90cc22b commit 449cfa5

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/route/routecontroller.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -702,8 +702,8 @@ bool RouteController::appendFlightplan(const QString& filename)
702702
route.updateAll();
703703
updateAirwaysAndAltitude();
704704

705-
updateTableModel();
706705
route.updateActiveLegAndPos(true /* force update */);
706+
updateTableModel();
707707

708708
postChange(undoCommand);
709709
NavApp::updateWindowTitle();
@@ -1118,8 +1118,8 @@ bool RouteController::calculateRouteInternal(RouteFinder *routeFinder, atools::f
11181118
route.updateAll();
11191119
updateAirwaysAndAltitude(!useSetAltitude /* adjustRouteAltitude */);
11201120

1121-
updateTableModel();
11221121
route.updateActiveLegAndPos(true /* force update */);
1122+
updateTableModel();
11231123

11241124
postChange(undoCommand);
11251125
NavApp::updateWindowTitle();
@@ -1252,8 +1252,8 @@ void RouteController::reverseRoute()
12521252
updateAirwaysAndAltitude();
12531253
updateStartPositionBestRunway(true /* force */, false /* undo */);
12541254

1255-
updateTableModel();
12561255
route.updateActiveLegAndPos(true /* force update */);
1256+
updateTableModel();
12571257

12581258
postChange(undoCommand);
12591259
NavApp::updateWindowTitle();
@@ -1336,8 +1336,8 @@ void RouteController::postDatabaseLoad()
13361336
flightplan.getDepartureParkingName().isEmpty())
13371337
updateStartPositionBestRunway(false, true);
13381338

1339-
updateTableModel();
13401339
route.updateActiveLegAndPos(true /* force update */);
1340+
updateTableModel();
13411341

13421342
NavApp::updateWindowTitle();
13431343
routeAltDelayTimer.start(ROUTE_ALT_CHANGE_DELAY_MS);
@@ -1882,6 +1882,7 @@ void RouteController::moveSelectedLegsInternal(MoveDirection direction)
18821882
// Get type and cruise altitude from widgets
18831883
updateFlightplanFromWidgets();
18841884

1885+
route.updateActiveLegAndPos(true /* force update */);
18851886
updateTableModel();
18861887

18871888
// Restore current position at new moved position
@@ -1890,7 +1891,6 @@ void RouteController::moveSelectedLegsInternal(MoveDirection direction)
18901891
select(rows, direction);
18911892

18921893
updateMoveAndDeleteActions();
1893-
route.updateActiveLegAndPos(true /* force update */);
18941894

18951895
postChange(undoCommand);
18961896
NavApp::updateWindowTitle();
@@ -1947,12 +1947,12 @@ void RouteController::deleteSelectedLegs()
19471947
// Get type and cruise altitude from widgets
19481948
updateFlightplanFromWidgets();
19491949

1950+
route.updateActiveLegAndPos(true /* force update */);
19501951
updateTableModel();
19511952

19521953
// Update current position at the beginning of the former selection
19531954
view->setCurrentIndex(model->index(firstRow, 0));
19541955
updateMoveAndDeleteActions();
1955-
route.updateActiveLegAndPos(true /* force update */);
19561956

19571957
postChange(undoCommand);
19581958
NavApp::updateWindowTitle();
@@ -2083,8 +2083,8 @@ void RouteController::routeSetDeparture(map::MapAirport airport)
20832083
// Get type and cruise altitude from widgets
20842084
updateFlightplanFromWidgets();
20852085

2086-
updateTableModel();
20872086
route.updateActiveLegAndPos(true /* force update */);
2087+
updateTableModel();
20882088

20892089
postChange(undoCommand);
20902090
NavApp::updateWindowTitle();
@@ -2135,8 +2135,8 @@ void RouteController::routeSetDestination(map::MapAirport airport)
21352135
// Get type and cruise altitude from widgets
21362136
updateFlightplanFromWidgets();
21372137

2138-
updateTableModel();
21392138
route.updateActiveLegAndPos(true /* force update */);
2139+
updateTableModel();
21402140

21412141
postChange(undoCommand);
21422142
NavApp::updateWindowTitle();
@@ -2223,8 +2223,8 @@ void RouteController::routeAttachProcedure(const proc::MapProcedureLegs& legs)
22232223
// Get type and cruise altitude from widgets
22242224
updateFlightplanFromWidgets();
22252225

2226-
updateTableModel();
22272226
route.updateActiveLegAndPos(true /* force update */);
2227+
updateTableModel();
22282228

22292229
postChange(undoCommand);
22302230
NavApp::updateWindowTitle();
@@ -2280,8 +2280,8 @@ void RouteController::routeAddInternal(const FlightplanEntry& entry, int insertI
22802280
// Get type and cruise altitude from widgets
22812281
updateFlightplanFromWidgets();
22822282

2283-
updateTableModel();
22842283
route.updateActiveLegAndPos(true /* force update */);
2284+
updateTableModel();
22852285

22862286
postChange(undoCommand);
22872287
NavApp::updateWindowTitle();
@@ -2395,8 +2395,8 @@ void RouteController::routeReplace(int id, atools::geo::Pos userPos, map::MapObj
23952395
// Get type and cruise altitude from widgets
23962396
updateFlightplanFromWidgets();
23972397

2398-
updateTableModel();
23992398
route.updateActiveLegAndPos(true /* force update */);
2399+
updateTableModel();
24002400

24012401
postChange(undoCommand);
24022402
NavApp::updateWindowTitle();

0 commit comments

Comments
 (0)