Clarify closing dialog on build settings
This commit is contained in:
@@ -244,11 +244,14 @@ class GuiBuildSettings(QDialog):
|
|||||||
##
|
##
|
||||||
|
|
||||||
def _askToSaveBuild(self) -> None:
|
def _askToSaveBuild(self) -> None:
|
||||||
"""Check if there are unsaved changes, and if there are, ask if
|
"""Check if there are unsaved changes, and if there are, ask
|
||||||
it's ok to reject them.
|
whether the user wants to save them.
|
||||||
"""
|
"""
|
||||||
if self._build.changed:
|
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._emitBuildData()
|
||||||
self._build.resetChangedState()
|
self._build.resetChangedState()
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user