mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Use right enum for message dialog
This commit is contained in:
parent
111d335743
commit
c9e625767b
3 changed files with 3 additions and 3 deletions
|
@ -206,7 +206,7 @@ class ContainerManager(QObject):
|
|||
if os.path.exists(file_url):
|
||||
result = QMessageBox.question(None, catalog.i18nc("@title:window", "File Already Exists"),
|
||||
catalog.i18nc("@label Don't translate the XML tag <filename>!", "The file <filename>{0}</filename> already exists. Are you sure you want to overwrite it?").format(file_url))
|
||||
if result == QMessageBox.No:
|
||||
if result == QMessageBox.ButtonRole.NoRole:
|
||||
return {"status": "cancelled", "message": "User cancelled"}
|
||||
|
||||
try:
|
||||
|
|
|
@ -139,7 +139,7 @@ class CuraContainerRegistry(ContainerRegistry):
|
|||
if os.path.exists(file_name):
|
||||
result = QMessageBox.question(None, catalog.i18nc("@title:window", "File Already Exists"),
|
||||
catalog.i18nc("@label Don't translate the XML tag <filename>!", "The file <filename>{0}</filename> already exists. Are you sure you want to overwrite it?").format(file_name))
|
||||
if result == QMessageBox.No:
|
||||
if result == QMessageBox.ButtonRole.NoRole:
|
||||
return False
|
||||
|
||||
profile_writer = self._findProfileWriter(extension, description)
|
||||
|
|
|
@ -480,7 +480,7 @@ class CloudOutputDeviceManager:
|
|||
if remove_printers_ids == all_ids:
|
||||
question_content = self.i18n_catalog.i18nc("@label", "You are about to remove all printers from Cura. This action cannot be undone.\nAre you sure you want to continue?")
|
||||
result = QMessageBox.question(None, question_title, question_content)
|
||||
if result == QMessageBox.No:
|
||||
if result == QMessageBox.ButtonRole.NoRole:
|
||||
return
|
||||
|
||||
for machine_cloud_id in self.reported_device_ids:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue