vFlightDataSystems / VATSIM_EDST_frontend

GNU General Public License v3.0
0 stars 4 forks source link

Add support for multiple "Previous Route"s #13

Open erikquinn opened 2 years ago

erikquinn commented 2 years ago

At the moment, the "Previous Route" button in the route menu, if pressed repeatedly, will simply revert to the one most recent route. Results in a loop, ie D->C->D->C.

This is presumably because the "previous" route is stored as a string of some sort of property of the aircraft instance. Instead store an array which holds all versions of the route. Then, at version D of the route, we are able to revert D->C->B->A. For bonus points, some sort of list showing all the previous routes, from which you can select the appropriate one would be AMAZING.

Once reverting to a previous route (say version B), it is safe to delete version B and everything that came after it (B+C+D) from the route history array-- you do not want to preserve a route reversion in the history, ie once you revert to previous, it should be impossible to "un-revert".