From 35b30a01edb49f9d69f42d7aa538b01acf69b829 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 14 Oct 2021 21:03:55 -0700 Subject: [PATCH] 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 --- qt_ui/windows/mission/flight/QFlightCreator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt_ui/windows/mission/flight/QFlightCreator.py b/qt_ui/windows/mission/flight/QFlightCreator.py index c432a845..306c9b8e 100644 --- a/qt_ui/windows/mission/flight/QFlightCreator.py +++ b/qt_ui/windows/mission/flight/QFlightCreator.py @@ -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)