icon additon in open SVG

CURA-11403
This commit is contained in:
Saumya Jain 2024-02-29 18:51:48 +01:00
parent f3c49e494e
commit f678ff2de2
5 changed files with 51 additions and 26 deletions

View file

@ -29,13 +29,6 @@ UM.Dialog
property var fileUrl
property var addToRecent: true //Whether to add this file to the recent files list after reading it.
// load the entire project
function loadProjectFile() {
UM.WorkspaceFileHandler.readLocalFile(base.fileUrl, base.addToRecent);
base.hide()
}
// load the project file as separated models
function loadModelFiles() {
@ -57,10 +50,8 @@ UM.Dialog
// when hitting 'enter', we always open as project unless open_as_model was explicitly stored as preference
if (openAsPreference == "open_as_model") {
loadModelFiles()
} else if (openAsPreference == "open_as_ucp"){
} else{
loadUcpFiles()
}else {
loadProjectFile()
}
}
@ -78,21 +69,17 @@ UM.Dialog
}
}
onAccepted: loadProjectFile()
onAccepted: loadUcpFile()
onRejected: loadModelFiles()
buttonSpacing: UM.Theme.getSize("thin_margin").width
rightButtons:
[
Cura.SecondaryButton
{
text: catalog.i18nc("@action:button", "Open as project")
onClicked: loadProjectFile()
},
Cura.PrimaryButton
{
text: catalog.i18nc("@action:button", "Open as UCP")
iconSource: UM.Theme.getIcon("CuraShareIcon")
onClicked: loadUcpFiles()
},
Cura.SecondaryButton