Revert "Revert CURA-8055 in the 4.10 branch. This should not have been merged in there."

This reverts commit 4d29de4579.
Effectively this re-applies the changes for CURA-8055 / #9957.
This commit is contained in:
Ghostkeeper 2021-06-24 14:20:38 +02:00
parent 84b5b19584
commit f82384d93c
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
6 changed files with 98 additions and 4 deletions

View file

@ -1,5 +1,5 @@
// Copyright (c) 2018 Ultimaker B.V.
// Uranium is released under the terms of the LGPLv3 or higher.
// Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7
import QtQuick.Controls 1.4
@ -191,6 +191,20 @@ Item
}
enabled: base.hasCurrentItem
}
//Sync button.
Button
{
id: syncMaterialsButton
text: catalog.i18nc("@action:button Sending materials to printers", "Sync with Printers")
iconName: "sync-synchronizing"
onClicked:
{
forceActiveFocus();
exportAllMaterialsDialog.open();
}
visible: Cura.MachineManager.activeMachine.supportsMaterialExport
}
}
Item {
@ -368,6 +382,20 @@ Item
}
}
FileDialog
{
id: exportAllMaterialsDialog
title: catalog.i18nc("@title:window", "Export All Materials")
selectExisting: false
nameFilters: ["Material archives (*.umm)", "All files (*)"]
folder: base.materialManagementModel.preferredExportAllPath
onAccepted:
{
base.materialManagementModel.exportAll(fileUrl);
CuraApplication.setDefaultPath("dialog_material_path", folder);
}
}
MessageDialog
{
id: messageDialog