mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-30 10:05:42 +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
|
return
|
||||||
|
|
||||||
application.setConfirmExitDialogCallback(self._onConfirmExitDialogResult)
|
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:
|
def _onConfirmExitDialogResult(self, result: bool) -> None:
|
||||||
if result:
|
if result:
|
||||||
|
@ -720,6 +720,14 @@ UM.MainWindow
|
|||||||
onYes: CuraApplication.callConfirmExitDialogCallback(true)
|
onYes: CuraApplication.callConfirmExitDialogCallback(true)
|
||||||
onNo: CuraApplication.callConfirmExitDialogCallback(false)
|
onNo: CuraApplication.callConfirmExitDialogCallback(false)
|
||||||
onRejected: 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
|
Connections
|
||||||
|
Loading…
x
Reference in New Issue
Block a user