mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Add confirmation dialogue for sending prints to top of queue
Very simple. Just re-use the MessageDialog component. Contributes to issues CL-1053 and CURA-5729.
This commit is contained in:
parent
ac4ee8c428
commit
83528ffb48
1 changed files with 14 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
import QtQuick 2.2
|
||||
import QtQuick.Dialogs 1.1
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtGraphicalEffects 1.0
|
||||
|
@ -212,8 +213,8 @@ Item
|
|||
text: catalog.i18nc("@label", "Move to top")
|
||||
onClicked:
|
||||
{
|
||||
OutputDevice.sendJobToTop(printJob.key)
|
||||
popup.close()
|
||||
sendToTopConfirmationDialog.visible = true;
|
||||
popup.close();
|
||||
}
|
||||
width: parent.width
|
||||
enabled: OutputDevice.queuedPrintJobs[0].key != printJob.key
|
||||
|
@ -227,6 +228,17 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
MessageDialog
|
||||
{
|
||||
id: sendToTopConfirmationDialog
|
||||
title: catalog.i18nc("@window:title", "Move print job to top")
|
||||
icon: StandardIcon.Warning
|
||||
text: catalog.i18nc("@label %1 is the name of a print job.", "Are you sure you want to move %1 to the top of the queue?").arg(printJob.name)
|
||||
standardButtons: StandardButton.Yes | StandardButton.No
|
||||
Component.onCompleted: visible = false
|
||||
onYes: OutputDevice.sendJobToTop(printJob.key)
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
id: deleteButton
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue