mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 18:27:51 -06:00
Add confirmation dialogue before aborting a print
It's a destructive operation so we should ask first. Contributes to issue CL-1053 and CURA-5729.
This commit is contained in:
parent
51d342678e
commit
a7a022eca0
1 changed files with 14 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
import QtQuick 2.3
|
||||
import QtQuick.Dialogs 1.1
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.3
|
||||
import QtGraphicalEffects 1.0
|
||||
|
@ -443,8 +444,8 @@ Component
|
|||
text: catalog.i18nc("@label", "Abort")
|
||||
onClicked:
|
||||
{
|
||||
modelData.activePrintJob.setState("abort")
|
||||
popup.close()
|
||||
abortConfirmationDialog.visible = true;
|
||||
popup.close();
|
||||
}
|
||||
width: parent.width
|
||||
anchors.top: pauseButton.bottom
|
||||
|
@ -456,6 +457,17 @@ Component
|
|||
color: UM.Theme.getColor("viewport_background")
|
||||
}
|
||||
}
|
||||
|
||||
MessageDialog
|
||||
{
|
||||
id: abortConfirmationDialog
|
||||
title: catalog.i18nc("@window:title", "Abort print")
|
||||
icon: StandardIcon.Warning
|
||||
text: catalog.i18nc("@label %1 is the name of a print job.", "Are you sure you want to abort %1?").arg(modelData.activePrintJob.name)
|
||||
standardButtons: StandardButton.Yes | StandardButton.No
|
||||
Component.onCompleted: visible = false
|
||||
onYes: modelData.activePrintJob.setState("abort")
|
||||
}
|
||||
}
|
||||
|
||||
background: Item
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue