mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-29 17:45:45 +08:00
Merge branch 'CURA-5384_confirm_upon_exit' of github.com:Ultimaker/Cura into CURA-5384_confirm_upon_exit
This commit is contained in:
commit
db669119f2
@ -100,7 +100,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
||||
return
|
||||
|
||||
application.setConfirmExitDialogCallback(self._onConfirmExitDialogResult)
|
||||
application.showConfirmExitDialog.emit("USB printing is in progress")
|
||||
application.showConfirmExitDialog.emit(catalog.i18nc("@label", "A USB print is in progress, closing Cura will stop this print. Are you sure?"))
|
||||
|
||||
def _onConfirmExitDialogResult(self, result: bool) -> None:
|
||||
if result:
|
||||
|
@ -720,6 +720,14 @@ UM.MainWindow
|
||||
onYes: CuraApplication.callConfirmExitDialogCallback(true)
|
||||
onNo: CuraApplication.callConfirmExitDialogCallback(false)
|
||||
onRejected: CuraApplication.callConfirmExitDialogCallback(false)
|
||||
onVisibilityChanged:
|
||||
{
|
||||
if (!visible)
|
||||
{
|
||||
// reset the text to default because other modules may change the message text.
|
||||
text = catalog.i18nc("@label", "Are you sure you want to exit Cura?");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
|
Loading…
x
Reference in New Issue
Block a user