Merge branch 'master' into layer_view3_cleanup

This commit is contained in:
Jack Ha 2017-01-17 15:16:50 +01:00
commit abe7a8e9a3
42 changed files with 12101 additions and 89 deletions

View file

@ -269,16 +269,16 @@ UM.MainWindow
if(drop.urls.length > 0)
{
// Import models
var imported_model = -1;
for(var i in drop.urls)
{
// There is no endsWith in this version of JS...
if ((drop.urls[i].length <= 12) || (drop.urls[i].substring(drop.urls[i].length-12) !== ".curaprofile")) {
// Drop an object
UM.MeshFileHandler.readLocalFile(drop.urls[i]);
if (i == drop.urls.length - 1)
Printer.readLocalFile(drop.urls[i]);
if (imported_model == -1)
{
var meshName = backgroundItem.getMeshName(drop.urls[i].toString());
backgroundItem.hasMesh(decodeURIComponent(meshName));
imported_model = i;
}
}
}
@ -297,6 +297,11 @@ UM.MainWindow
}
messageDialog.open()
}
if (imported_model != -1)
{
var meshName = backgroundItem.getMeshName(drop.urls[imported_model].toString())
backgroundItem.hasMesh(decodeURIComponent(meshName))
}
}
}
}
@ -406,7 +411,8 @@ UM.MainWindow
iconSource: UM.Theme.getIcon("viewmode");
style: UM.Theme.styles.tool_button;
tooltip: '';
tooltip: "";
enabled: !PrintInformation.preSliced
menu: ViewMenu { }
}
@ -731,14 +737,11 @@ UM.MainWindow
for(var i in fileUrls)
{
UM.MeshFileHandler.readLocalFile(fileUrls[i])
if (i == fileUrls.length - 1)
{
var meshName = backgroundItem.getMeshName(fileUrls.toString())
backgroundItem.hasMesh(decodeURIComponent(meshName))
}
Printer.readLocalFile(fileUrls[i])
}
var meshName = backgroundItem.getMeshName(fileUrls[0].toString())
backgroundItem.hasMesh(decodeURIComponent(meshName))
}
}

View file

@ -26,7 +26,7 @@ Menu
return (index + 1) + ". " + path.slice(path.lastIndexOf("/") + 1);
}
onTriggered: {
UM.MeshFileHandler.readLocalFile(modelData);
Printer.readLocalFile(modelData);
var meshName = backgroundItem.getMeshName(modelData.toString())
backgroundItem.hasMesh(decodeURIComponent(meshName))
}

View file

@ -11,6 +11,7 @@ Menu
{
title: catalog.i18nc("@title:menu menubar:toplevel", "&View");
id: menu
enabled: !PrintInformation.preSliced
Instantiator
{
model: UM.ViewModel { }

View file

@ -97,6 +97,7 @@ UM.PreferencesPage
append({ text: "Français", code: "fr" })
append({ text: "Italiano", code: "it" })
append({ text: "Nederlands", code: "nl" })
append({ text: "Русский", code: "ru" })
append({ text: "Türkçe", code: "tr" })
}
}

View file

@ -34,6 +34,8 @@ Rectangle {
return catalog.i18nc("@label:PrintjobStatus %1 is target operation","Ready to %1").arg(UM.OutputDeviceManager.activeDeviceShortDescription);
case 4:
return catalog.i18nc("@label:PrintjobStatus", "Unable to Slice");
case 5:
return catalog.i18nc("@label:PrintjobStatus", "Slicing unavailable");
default:
return "";
}
@ -104,7 +106,7 @@ Rectangle {
id: saveToButton
tooltip: UM.OutputDeviceManager.activeDeviceDescription;
enabled: base.backendState == 3 && base.activity == true
enabled: (base.backendState == 3 || base.backendState == 5) && base.activity == true
height: UM.Theme.getSize("save_button_save_to_button").height
anchors.top: parent.top
@ -179,7 +181,7 @@ Rectangle {
anchors.rightMargin: UM.Theme.getSize("default_margin").width
width: UM.Theme.getSize("save_button_save_to_button").height
height: UM.Theme.getSize("save_button_save_to_button").height
enabled: base.backendState == 3 && base.activity == true
enabled: (base.backendState == 3 || base.backendState == 5) && base.activity == true
visible: devicesModel.deviceCount > 1

View file

@ -167,7 +167,7 @@ Item
id: definitionsModel;
containerId: Cura.MachineManager.activeDefinitionId
visibilityHandler: UM.SettingPreferenceVisibilityHandler { }
exclude: ["machine_settings", "command_line_settings", "infill_mesh", "infill_mesh_order"] // TODO: infill_mesh settigns are excluded hardcoded, but should be based on the fact that settable_globally, settable_per_meshgroup and settable_per_extruder are false.
exclude: ["machine_settings", "command_line_settings", "infill_mesh", "infill_mesh_order", "support_mesh", "anti_overhang_mesh"] // TODO: infill_mesh settigns are excluded hardcoded, but should be based on the fact that settable_globally, settable_per_meshgroup and settable_per_extruder are false.
expanded: Printer.expandedCategories
onExpandedChanged:
{

View file

@ -16,6 +16,7 @@ Rectangle
property int currentModeIndex;
property bool monitoringPrint: false
property bool hideSettings: PrintInformation.preSliced
Connections
{
target: Printer
@ -270,7 +271,7 @@ Rectangle
Rectangle {
id: headerSeparator
width: parent.width
visible: !monitoringPrint
visible: !monitoringPrint && !hideSettings
height: visible ? UM.Theme.getSize("sidebar_lining").height : 0
color: UM.Theme.getColor("sidebar_lining")
anchors.top: header.bottom
@ -288,7 +289,7 @@ Rectangle
Label {
id: settingsModeLabel
text: catalog.i18nc("@label:listbox", "Print Setup");
text: !hideSettings ? catalog.i18nc("@label:listbox", "Print Setup") : catalog.i18nc("@label:listbox","Print Setup disabled\nG-code files cannot be modified");
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width;
anchors.top: headerSeparator.bottom
@ -308,7 +309,7 @@ Rectangle
anchors.rightMargin: UM.Theme.getSize("default_margin").width
anchors.top: headerSeparator.bottom
anchors.topMargin: UM.Theme.getSize("default_margin").height
visible: !monitoringPrint
visible: !monitoringPrint && !hideSettings
Component{
id: wizardDelegate
Button {
@ -384,7 +385,7 @@ Rectangle
height: settingsModeSelection.height
width: visible ? height : 0
visible: !monitoringPrint && modesListModel.get(base.currentModeIndex) != undefined && modesListModel.get(base.currentModeIndex).showFilterButton
visible: !monitoringPrint && !hideSettings && modesListModel.get(base.currentModeIndex) != undefined && modesListModel.get(base.currentModeIndex).showFilterButton
opacity: visible ? 1 : 0
onClicked: sidebarContents.currentItem.toggleFilterField()
@ -432,7 +433,7 @@ Rectangle
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.left: base.left
anchors.right: base.right
visible: !monitoringPrint
visible: !monitoringPrint && !hideSettings
delegate: StackViewDelegate
{

View file

@ -164,7 +164,7 @@ Column
id: variantRow
height: UM.Theme.getSize("sidebar_setup").height
visible: (Cura.MachineManager.hasVariants || Cura.MachineManager.hasMaterials) && !sidebar.monitoringPrint
visible: (Cura.MachineManager.hasVariants || Cura.MachineManager.hasMaterials) && !sidebar.monitoringPrint && !sidebar.hideSettings
anchors
{
@ -261,7 +261,7 @@ Column
{
id: globalProfileRow
height: UM.Theme.getSize("sidebar_setup").height
visible: !sidebar.monitoringPrint
visible: !sidebar.monitoringPrint && !sidebar.hideSettings
anchors
{