mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-24 13:39:05 +08:00
Merge pull request #12007 from Ultimaker/CURA-9214_export_profile_doesnt_work
[CURA-9214] Can't export profiles, also fixes exporting materials
This commit is contained in:
commit
f33aaa529b
@ -246,7 +246,7 @@ UM.ManagementPage
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
messageDialog.open();
|
messageDialog.open();
|
||||||
CuraApplication.setDefaultPath("dialog_material_path", folder);
|
CuraApplication.setDefaultPath("dialog_material_path", currentFolder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -259,7 +259,9 @@ UM.ManagementPage
|
|||||||
currentFolder: CuraApplication.getDefaultPath("dialog_material_path")
|
currentFolder: CuraApplication.getDefaultPath("dialog_material_path")
|
||||||
onAccepted:
|
onAccepted:
|
||||||
{
|
{
|
||||||
const result = Cura.ContainerManager.exportContainer(base.currentItem.root_material_id, selectedNameFilter, selectedFile);
|
const nameFilterString = selectedNameFilter.index >= 0 ? nameFilters[selectedNameFilter.index] : nameFilters[0];
|
||||||
|
|
||||||
|
const result = Cura.ContainerManager.exportContainer(base.currentItem.root_material_id, nameFilterString, selectedFile);
|
||||||
|
|
||||||
const messageDialog = Qt.createQmlObject("import Cura 1.5 as Cura; Cura.MessageDialog { onClosed: destroy() }", base);
|
const messageDialog = Qt.createQmlObject("import Cura 1.5 as Cura; Cura.MessageDialog { onClosed: destroy() }", base);
|
||||||
messageDialog.title = catalog.i18nc("@title:window", "Export Material");
|
messageDialog.title = catalog.i18nc("@title:window", "Export Material");
|
||||||
@ -275,7 +277,7 @@ UM.ManagementPage
|
|||||||
}
|
}
|
||||||
messageDialog.open();
|
messageDialog.open();
|
||||||
|
|
||||||
CuraApplication.setDefaultPath("dialog_material_path", folder);
|
CuraApplication.setDefaultPath("dialog_material_path", currentFolder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -354,8 +354,13 @@ UM.ManagementPage
|
|||||||
currentFolder: CuraApplication.getDefaultPath("dialog_profile_path")
|
currentFolder: CuraApplication.getDefaultPath("dialog_profile_path")
|
||||||
onAccepted:
|
onAccepted:
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// If nameFilters contains only 1 item, the index of selectedNameFilter will always be -1
|
||||||
|
// This fetches the nameFilter at index selectedNameFilter.index if it is positive
|
||||||
|
const nameFilterString = selectedNameFilter.index >= 0 ? nameFilters[selectedNameFilter.index] : nameFilters[0];
|
||||||
|
|
||||||
var result = Cura.ContainerManager.exportQualityChangesGroup(base.currentItem.quality_changes_group,
|
var result = Cura.ContainerManager.exportQualityChangesGroup(base.currentItem.quality_changes_group,
|
||||||
selectedFile, selectedNameFilter);
|
selectedFile, nameFilterString);
|
||||||
|
|
||||||
if (result && result.status == "error")
|
if (result && result.status == "error")
|
||||||
{
|
{
|
||||||
@ -365,7 +370,7 @@ UM.ManagementPage
|
|||||||
}
|
}
|
||||||
|
|
||||||
// else pop-up Message thing from python code
|
// else pop-up Message thing from python code
|
||||||
CuraApplication.setDefaultPath("dialog_profile_path", folder);
|
CuraApplication.setDefaultPath("dialog_profile_path", currentFolder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user