Change remaining MessageDialogs to our version

Contributes to issue CURA-8687.
This commit is contained in:
Ghostkeeper 2022-02-04 15:49:06 +01:00
parent a03988d146
commit 2606a3b847
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
7 changed files with 41 additions and 55 deletions

View file

@ -119,21 +119,20 @@ Item
width: base.width
property real rowHeight: brandTextField.height + UM.Theme.getSize("default_lining").height
MessageDialog
UM.MessageDialog
{
id: confirmDiameterChangeDialog
anchors.centerIn: base
icon: StandardIcon.Question;
title: catalog.i18nc("@title:window", "Confirm Diameter Change")
text: catalog.i18nc("@label (%1 is a number)", "The new filament diameter is set to %1 mm, which is not compatible with the current extruder. Do you wish to continue?".arg(new_diameter_value))
standardButtons: StandardButton.Yes | StandardButton.No
modality: Qt.ApplicationModal
standardButtons: Dialog.Yes | Dialog.No
property var new_diameter_value: null;
property var old_diameter_value: null;
property var old_approximate_diameter_value: null;
onYes:
onAccepted:
{
base.setMetaDataEntry("approximate_diameter", old_approximate_diameter_value, getApproximateDiameter(new_diameter_value).toString());
base.setMetaDataEntry("properties/diameter", properties.diameter, new_diameter_value);
@ -142,13 +141,11 @@ Item
base.resetSelectedMaterial()
}
onNo:
onRejected:
{
base.properties.diameter = old_diameter_value;
diameterSpinBox.value = Qt.binding(function() { return base.properties.diameter })
}
onRejected: no()
}
Label { width: informationPage.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Display Name") }

View file

@ -269,7 +269,7 @@ Item
}
// Confirmation dialog for removing a profile
MessageDialog
UM.MessageDialog
{
id: confirmRemoveQualityDialog