mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Make the new package dialog modal.
In the *new* package dialog, a package has been created and may have aircraft assigned to it, but it is not a part of the ATO until the user saves it. Other actions (modifying settings, closing some other dialogs like the base menu) can cause a Game update which will forcibly close this window without either accepting or rejecting it, so we neither save the package nor release any allocated units. While it would be preferable to be able to update this dialog as needed in the event of game updates, the quick fix is to just not allow interaction with other UI elements until the new package has either been finalized or canceled. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1027
This commit is contained in:
parent
6d682d509f
commit
3e43414d9c
@ -221,6 +221,19 @@ class QNewPackageDialog(QPackageDialog):
|
|||||||
)
|
)
|
||||||
self.ato_model = model
|
self.ato_model = model
|
||||||
|
|
||||||
|
# In the *new* package dialog, a package has been created and may have aircraft
|
||||||
|
# assigned to it, but it is not a part of the ATO until the user saves it.
|
||||||
|
#
|
||||||
|
# Other actions (modifying settings, closing some other dialogs like the base
|
||||||
|
# menu) can cause a Game update which will forcibly close this window without
|
||||||
|
# either accepting or rejecting it, so we neither save the package nor release
|
||||||
|
# any allocated units.
|
||||||
|
#
|
||||||
|
# While it would be preferable to be able to update this dialog as needed in the
|
||||||
|
# event of game updates, the quick fix is to just not allow interaction with
|
||||||
|
# other UI elements until the new package has either been finalized or canceled.
|
||||||
|
self.setModal(True)
|
||||||
|
|
||||||
self.save_button = QPushButton("Save")
|
self.save_button = QPushButton("Save")
|
||||||
self.save_button.setProperty("style", "start-button")
|
self.save_button.setProperty("style", "start-button")
|
||||||
self.save_button.clicked.connect(self.accept)
|
self.save_button.clicked.connect(self.accept)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user