Use correct descriptor for project open

CURA-1263
This commit is contained in:
Jaime van Kessel 2016-12-02 11:13:21 +01:00
parent 4cf454757f
commit 5119ee9a93
3 changed files with 74 additions and 18 deletions

View file

@ -110,8 +110,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
Logger.log("w", "File %s is not a valid workspace.", file_name) Logger.log("w", "File %s is not a valid workspace.", file_name)
return WorkspaceReader.PreReadResult.failed return WorkspaceReader.PreReadResult.failed
if machine_conflict or quality_changes_conflict or material_conflict: # Show the dialog, informing the user what is about to happen.
# There is a conflict; User should choose to either update the existing data, add everything as new data or abort
self._dialog.setMachineConflict(machine_conflict) self._dialog.setMachineConflict(machine_conflict)
self._dialog.setQualityChangesConflict(quality_changes_conflict) self._dialog.setQualityChangesConflict(quality_changes_conflict)
self._dialog.setMaterialConflict(material_conflict) self._dialog.setMaterialConflict(material_conflict)

View file

@ -48,7 +48,7 @@ UM.Dialog
// See http://stackoverflow.com/questions/7659442/listelement-fields-as-properties // See http://stackoverflow.com/questions/7659442/listelement-fields-as-properties
Component.onCompleted: Component.onCompleted:
{ {
append({"key": "override", "label": catalog.i18nc("@action:ComboBox option", "Override existing")}); append({"key": "override", "label": catalog.i18nc("@action:ComboBox option", "Update existing")});
append({"key": "new", "label": catalog.i18nc("@action:ComboBox option", "Create new")}); append({"key": "new", "label": catalog.i18nc("@action:ComboBox option", "Create new")});
} }
} }
@ -56,14 +56,70 @@ UM.Dialog
Column Column
{ {
anchors.fill: parent anchors.fill: parent
spacing: 2
Label Label
{ {
id: infoLabel id: titleLabel
width: parent.width text: catalog.i18nc("@action:title", "Summary - Cura Project")
text: catalog.i18nc("@action:label", "Cura detected a number of conflicts while importing the workspace. How would you like to resolve these?") font.pixelSize: 22
wrapMode: Text.Wrap
height: 50
} }
Rectangle
{
id: separator
color: "black"
width: parent.width
height: 1
}
Item // Spacer
{
height: 5
width: height
}
Label
{
text: catalog.i18nc("@action:label", "Printer settings")
font.bold: true
}
Row
{
width: parent.width
height: childrenRect.height
Label
{
text: catalog.i18nc("@action:label", "Type")
width: parent.width / 3
}
Label
{
text: catalog.i18nc("@action:label", "TOCHANGE")
width: parent.width / 3
}
}
Label
{
text: catalog.i18nc("@action:label", "Profile settings")
font.bold: true
}
Row
{
width: parent.width
height: childrenRect.height
Label
{
text: catalog.i18nc("@action:label", "Type")
width: parent.width / 3
}
Label
{
text: catalog.i18nc("@action:label", "TOCHANGE")
width: parent.width / 3
}
}
UM.TooltipArea UM.TooltipArea
{ {
id: machineResolveTooltip id: machineResolveTooltip
@ -86,6 +142,7 @@ UM.Dialog
model: resolveStrategiesModel model: resolveStrategiesModel
textRole: "label" textRole: "label"
id: machineResolveComboBox id: machineResolveComboBox
width: 150
onActivated: onActivated:
{ {
manager.setResolveStrategy("machine", resolveStrategiesModel.get(index).key) manager.setResolveStrategy("machine", resolveStrategiesModel.get(index).key)

View file

@ -290,7 +290,7 @@ Item
Action Action
{ {
id: loadWorkspaceAction id: loadWorkspaceAction
text: catalog.i18nc("@action:inmenu menubar:file","&Save project..."); text: catalog.i18nc("@action:inmenu menubar:file","&Open project...");
} }
Action Action