Fix flight resizing when switching aircraft.

No idea why we were only resetting this if the max was >= 2. Instead,
always reset the flight to the default size when switching aircraft. The
default for anything capable of a two-ship is two, but limit based on
the airframe's group size limit and the number of aircraft available.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1593
This commit is contained in:
Dan Albert 2021-10-14 21:03:55 -07:00
parent 76b3ff5f6e
commit 35b30a01ed

View File

@ -234,5 +234,5 @@ class QFlightCreator(QDialog):
self.flight_size_spinner.setMaximum(min(available, aircraft.max_group_size))
if self.flight_size_spinner.maximum() >= 2:
self.flight_size_spinner.setValue(2)
default_size = max(2, available, aircraft.max_group_size)
self.flight_size_spinner.setValue(default_size)