Merge branch 'master' into master

This commit is contained in:
Mark 2018-08-29 14:00:46 +02:00 committed by GitHub
commit 43676d761c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 16 deletions

View File

@ -124,7 +124,7 @@ class BaseMaterialsModel(ListModel):
"description": metadata["description"], "description": metadata["description"],
"material": metadata["material"], "material": metadata["material"],
"color_name": metadata["color_name"], "color_name": metadata["color_name"],
"color_code": metadata["color_code"], "color_code": metadata.get("color_code", ""),
"density": metadata.get("properties", {}).get("density", ""), "density": metadata.get("properties", {}).get("density", ""),
"diameter": metadata.get("properties", {}).get("diameter", ""), "diameter": metadata.get("properties", {}).get("diameter", ""),
"approximate_diameter": metadata["approximate_diameter"], "approximate_diameter": metadata["approximate_diameter"],

View File

@ -364,7 +364,6 @@ Cura.MachineAction
{ {
id: addressField id: addressField
width: parent.width width: parent.width
maximumLength: 40
validator: RegExpValidator validator: RegExpValidator
{ {
regExp: /[a-zA-Z0-9\.\-\_]*/ regExp: /[a-zA-Z0-9\.\-\_]*/

View File

@ -1819,9 +1819,9 @@
"unit": "mm", "unit": "mm",
"type": "float", "type": "float",
"default_value": 0.1, "default_value": 0.1,
"minimum_value": "resolveOrValue('layer_height')", "minimum_value": "resolveOrValue('layer_height') if infill_line_distance > 0 else -999999",
"maximum_value_warning": "0.75 * machine_nozzle_size", "maximum_value_warning": "0.75 * machine_nozzle_size",
"maximum_value": "resolveOrValue('layer_height') * (1.45 if spaghetti_infill_enabled else 8)", "maximum_value": "resolveOrValue('layer_height') * (1.45 if spaghetti_infill_enabled else 8) if infill_line_distance > 0 else 999999",
"value": "resolveOrValue('layer_height')", "value": "resolveOrValue('layer_height')",
"enabled": "infill_sparse_density > 0 and not spaghetti_infill_enabled", "enabled": "infill_sparse_density > 0 and not spaghetti_infill_enabled",
"limit_to_extruder": "infill_extruder_nr", "limit_to_extruder": "infill_extruder_nr",

View File

@ -110,35 +110,35 @@ Item
Action Action
{ {
id: view3DCameraAction; id: view3DCameraAction;
text: catalog.i18nc("@action:inmenu menubar:view","&3D View"); text: catalog.i18nc("@action:inmenu menubar:view","3D View");
onTriggered: UM.Controller.rotateView("3d", 0); onTriggered: UM.Controller.rotateView("3d", 0);
} }
Action Action
{ {
id: viewFrontCameraAction; id: viewFrontCameraAction;
text: catalog.i18nc("@action:inmenu menubar:view","&Front View"); text: catalog.i18nc("@action:inmenu menubar:view","Front View");
onTriggered: UM.Controller.rotateView("home", 0); onTriggered: UM.Controller.rotateView("home", 0);
} }
Action Action
{ {
id: viewTopCameraAction; id: viewTopCameraAction;
text: catalog.i18nc("@action:inmenu menubar:view","&Top View"); text: catalog.i18nc("@action:inmenu menubar:view","Top View");
onTriggered: UM.Controller.rotateView("y", 90); onTriggered: UM.Controller.rotateView("y", 90);
} }
Action Action
{ {
id: viewLeftSideCameraAction; id: viewLeftSideCameraAction;
text: catalog.i18nc("@action:inmenu menubar:view","&Left Side View"); text: catalog.i18nc("@action:inmenu menubar:view","Left Side View");
onTriggered: UM.Controller.rotateView("x", 90); onTriggered: UM.Controller.rotateView("x", 90);
} }
Action Action
{ {
id: viewRightSideCameraAction; id: viewRightSideCameraAction;
text: catalog.i18nc("@action:inmenu menubar:view","&Right Side View"); text: catalog.i18nc("@action:inmenu menubar:view","Right Side View");
onTriggered: UM.Controller.rotateView("x", -90); onTriggered: UM.Controller.rotateView("x", -90);
} }
@ -229,7 +229,7 @@ Item
Action Action
{ {
id: deleteSelectionAction; id: deleteSelectionAction;
text: catalog.i18ncp("@action:inmenu menubar:edit", "Delete &Selected Model", "Delete &Selected Models", UM.Selection.selectionCount); text: catalog.i18ncp("@action:inmenu menubar:edit", "Delete Selected Model", "Delete Selected Models", UM.Selection.selectionCount);
enabled: UM.Controller.toolsEnabled && UM.Selection.hasSelection; enabled: UM.Controller.toolsEnabled && UM.Selection.hasSelection;
iconName: "edit-delete"; iconName: "edit-delete";
shortcut: StandardKey.Delete; shortcut: StandardKey.Delete;
@ -239,7 +239,7 @@ Item
Action //Also add backspace as the same function as delete because on Macintosh keyboards the button called "delete" is actually a backspace, and the user expects it to function as a delete. Action //Also add backspace as the same function as delete because on Macintosh keyboards the button called "delete" is actually a backspace, and the user expects it to function as a delete.
{ {
id: backspaceSelectionAction id: backspaceSelectionAction
text: catalog.i18ncp("@action:inmenu menubar:edit", "Delete &Selected Model", "Delete &Selected Models", UM.Selection.selectionCount) text: catalog.i18ncp("@action:inmenu menubar:edit", "Delete Selected Model", "Delete Selected Models", UM.Selection.selectionCount)
enabled: UM.Controller.toolsEnabled && UM.Selection.hasSelection enabled: UM.Controller.toolsEnabled && UM.Selection.hasSelection
iconName: "edit-delete" iconName: "edit-delete"
shortcut: StandardKey.Backspace shortcut: StandardKey.Backspace
@ -328,7 +328,7 @@ Item
Action Action
{ {
id: selectAllAction; id: selectAllAction;
text: catalog.i18nc("@action:inmenu menubar:edit","&Select All Models"); text: catalog.i18nc("@action:inmenu menubar:edit","Select All Models");
enabled: UM.Controller.toolsEnabled; enabled: UM.Controller.toolsEnabled;
iconName: "edit-select-all"; iconName: "edit-select-all";
shortcut: "Ctrl+A"; shortcut: "Ctrl+A";
@ -386,7 +386,7 @@ Item
Action Action
{ {
id: resetAllAction; id: resetAllAction;
text: catalog.i18nc("@action:inmenu menubar:edit","Reset All Model &Transformations"); text: catalog.i18nc("@action:inmenu menubar:edit","Reset All Model Transformations");
onTriggered: CuraApplication.resetAll(); onTriggered: CuraApplication.resetAll();
} }

View File

@ -117,7 +117,7 @@ UM.MainWindow
MenuItem MenuItem
{ {
id: saveWorkspaceMenu id: saveWorkspaceMenu
text: catalog.i18nc("@title:menu menubar:file","&Save...") text: catalog.i18nc("@title:menu menubar:file","Save...")
onTriggered: onTriggered:
{ {
var args = { "filter_by_machine": false, "file_type": "workspace", "preferred_mimetypes": "application/x-curaproject+xml" }; var args = { "filter_by_machine": false, "file_type": "workspace", "preferred_mimetypes": "application/x-curaproject+xml" };

View File

@ -10,7 +10,7 @@ import Cura 1.0 as Cura
Menu Menu
{ {
id: menu id: menu
title: "Material" title: catalog.i18nc("@label:category menu label", "Material")
property int extruderIndex: 0 property int extruderIndex: 0
@ -32,6 +32,12 @@ Menu
extruderPosition: menu.extruderIndex extruderPosition: menu.extruderIndex
} }
MenuItem
{
text: catalog.i18nc("@label:category menu label", "Favorites")
enabled: false
visible: favoriteMaterialsModel.items.length > 0
}
Instantiator Instantiator
{ {
model: favoriteMaterialsModel model: favoriteMaterialsModel
@ -52,7 +58,7 @@ Menu
Menu Menu
{ {
id: genericMenu id: genericMenu
title: "Generic" title: catalog.i18nc("@label:category menu label", "Generic")
Instantiator Instantiator
{ {