mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 14:34:01 -06:00
Remove central messageBox in favour of local box
The profile import/export was the only place where it was used, in our code base. Contributes to issue CURA-8687.
This commit is contained in:
parent
9a3cab1ec2
commit
7f8591718d
3 changed files with 9 additions and 58 deletions
|
@ -311,19 +311,8 @@ Item
|
|||
onAccepted:
|
||||
{
|
||||
var result = Cura.ContainerManager.importProfile(fileUrl);
|
||||
messageDialog.title = catalog.i18nc("@title:window", "Import Profile")
|
||||
messageDialog.text = result.message;
|
||||
if (result.status == "ok")
|
||||
{
|
||||
messageDialog.icon = StandardIcon.Information;
|
||||
}
|
||||
else if (result.status == "warning" || result.status == "duplicate")
|
||||
{
|
||||
messageDialog.icon = StandardIcon.Warning;
|
||||
}
|
||||
else
|
||||
{
|
||||
messageDialog.icon = StandardIcon.Critical;
|
||||
}
|
||||
messageDialog.open();
|
||||
CuraApplication.setDefaultPath("dialog_profile_path", folder);
|
||||
}
|
||||
|
@ -344,7 +333,7 @@ Item
|
|||
|
||||
if (result && result.status == "error")
|
||||
{
|
||||
messageDialog.icon = StandardIcon.Critical;
|
||||
messageDialog.title = catalog.i18nc("@title:window", "Export Profile")
|
||||
messageDialog.text = result.message;
|
||||
messageDialog.open();
|
||||
}
|
||||
|
@ -354,6 +343,13 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
//Dialogue box for showing the result of importing or exporting profiles.
|
||||
UM.MessageDialog
|
||||
{
|
||||
id: messageDialog
|
||||
standardButtons: Dialog.Ok
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
id: contentsItem
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue