Dan Albert 28d959bba0 Fix disappearing aircraft when deleting packages.
There are a few different code paths for deleting packages depending on
the state of the package, and two of them were deleting items from a
list they were iterating over without first making a copy, causing each
iteration of the loop to skip over a flight, making it still used since
the flight was never deleted, but unreachable since the package that
owned it was deleted.

This only happened when the package was canceled in its draft state
(the user clicked the X without ever saving the package), or if the user
canceled a package mid fast forward (the controls for which aren't even
visible to users) while only a portion of the package was active. In
both cases, only even numbered flights were lost.

There's a better fix lurking in here somewhere but the interaction with
the Qt model complicates it. Fortunately that mess would be cleaned up
automatically by moving this dialog into React, which we'll do some day.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3257.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3258.
2023-11-30 19:00:58 -08:00
..
2022-12-29 16:26:50 -08:00
2022-12-29 16:26:50 -08:00
2022-12-29 16:26:50 -08:00
2022-12-29 16:26:50 -08:00
2022-12-29 16:26:50 -08:00
2022-12-29 16:26:50 -08:00
2023-06-12 23:43:26 -07:00
2023-10-03 21:55:59 -07:00
2022-12-29 16:26:50 -08:00
2023-06-12 23:43:26 -07:00