From e60cde892a9d287944b2957f20c3fbc3260e9c10 Mon Sep 17 00:00:00 2001 From: SnappyComebacks <74509817+SnappyComebacks@users.noreply.github.com> Date: Sun, 10 Jul 2022 07:25:48 -0600 Subject: [PATCH] Added accept button to Air Wing Configuration window. (#2307) * Add accept button to Air Wing Configuration window. * Update black to 22.6.0. Change pre-commit to use updated black. * Update click to 8.1.3. --- .pre-commit-config.yaml | 2 +- changelog.md | 1 + qt_ui/windows/AirWingConfigurationDialog.py | 4 ++++ requirements.txt | 4 ++-- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4a3652d4..0bf8ec9f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/psf/black - rev: 22.1.0 + rev: 22.6.0 hooks: - id: black language_version: python3 \ No newline at end of file diff --git a/changelog.md b/changelog.md index 9656779b..04a2f8bb 100644 --- a/changelog.md +++ b/changelog.md @@ -20,6 +20,7 @@ Saves from 5.x are not compatible with 6.0. * **[Modding]** Updated the High Digit SAMs implementation and added the HQ-2 as well as the upgraded SA-2 and SA-3 Launchers from the mod. Threat range circles will now also be displayed correctly. * **[UI]** Added options to the loadout editor for setting properties such as HMD choice. * **[UI]** Added separate images for the different carrier types. +* **[UI]** Add Accept button to Air Wing Configurator screen. * **[Campaign]** Allow campaign designers to define default values for the economy settings (starting budget and multiplier). * **[Plugins]** Allow full support of the SkynetIADS plugin with all advanced features (connection nodes, power sources, command centers) if campaign supports it. * **[Plugins]** Added support for the CTLD script by ciribob with many possible customization options and updated the JTAC Autolase to the CTLD included script. diff --git a/qt_ui/windows/AirWingConfigurationDialog.py b/qt_ui/windows/AirWingConfigurationDialog.py index 101038e2..8dc8c2c2 100644 --- a/qt_ui/windows/AirWingConfigurationDialog.py +++ b/qt_ui/windows/AirWingConfigurationDialog.py @@ -512,6 +512,10 @@ class AirWingConfigurationDialog(QDialog): tab_widget.addTab(coalition_tab, name) self.tabs.append(coalition_tab) + apply_button = QPushButton("Accept") + apply_button.clicked.connect(lambda state: self.accept()) + layout.addWidget(apply_button) + def reject(self) -> None: for tab in self.tabs: tab.apply() diff --git a/requirements.txt b/requirements.txt index 92826bd6..b59da85f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,10 +3,10 @@ anyio==3.5.0 asgiref==3.5.0 atomicwrites==1.4.0 attrs==21.4.0 -black==22.1.0 +black==22.6.0 certifi==2021.10.8 cfgv==3.3.1 -click==8.0.3 +click==8.1.3 colorama==0.4.4 distlib==0.3.4 Faker==12.3.0