Clarify closing dialog on build settings

This commit is contained in:
Veronica Berglyd Olsen
2023-08-08 10:39:10 +02:00
parent de66f1e21b
commit 431bc8d401
+6 -3
View File
@@ -244,11 +244,14 @@ class GuiBuildSettings(QDialog):
##
def _askToSaveBuild(self) -> None:
"""Check if there are unsaved changes, and if there are, ask if
it's ok to reject them.
"""Check if there are unsaved changes, and if there are, ask
whether the user wants to save them.
"""
if self._build.changed:
if self.mainGui.askQuestion(self.tr("Do you want to save your changes?")):
response = self.mainGui.askQuestion(self.tr(
"Do you want to save your changes to '{0}'?".format(self._build.name)
))
if response:
self._emitBuildData()
self._build.resetChangedState()
return