Comment away everything related to activeprofile and machine manager in SidebarSimple

To make SidebarSimple at least display again
This commit is contained in:
Arjen Hiemstra 2016-05-10 17:29:29 +02:00
parent 3a99a2bc45
commit 199a30099e

View File

@ -61,7 +61,7 @@ Item
return -1; return -1;
} }
var density = parseInt(UM.ActiveProfile.settingValues.getValue("infill_sparse_density")); // var density = parseInt(UM.ActiveProfile.settingValues.getValue("infill_sparse_density"));
for(var i = 0; i < infillModel.count; ++i) for(var i = 0; i < infillModel.count; ++i)
{ {
if(density > infillModel.get(i).percentageMin && density <= infillModel.get(i).percentageMax ) if(density > infillModel.get(i).percentageMin && density <= infillModel.get(i).percentageMax )
@ -116,7 +116,7 @@ Item
onClicked: { onClicked: {
if (infillListView.activeIndex != index) if (infillListView.activeIndex != index)
{ {
UM.MachineManager.setSettingValue("infill_sparse_density", model.percentage) // UM.MachineManager.setSettingValue("infill_sparse_density", model.percentage)
} }
} }
onEntered: { onEntered: {
@ -213,13 +213,13 @@ Item
text: catalog.i18nc("@option:check","Generate Brim"); text: catalog.i18nc("@option:check","Generate Brim");
style: UM.Theme.styles.checkbox; style: UM.Theme.styles.checkbox;
checked: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("adhesion_type") == "brim" : false; // checked: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("adhesion_type") == "brim" : false;
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
onClicked: onClicked:
{ {
UM.MachineManager.setSettingValue("adhesion_type", !parent.checked?"brim":"skirt") // UM.MachineManager.setSettingValue("adhesion_type", !parent.checked?"brim":"skirt")
} }
onEntered: onEntered:
{ {
@ -246,13 +246,13 @@ Item
text: catalog.i18nc("@option:check","Generate Support Structure"); text: catalog.i18nc("@option:check","Generate Support Structure");
style: UM.Theme.styles.checkbox; style: UM.Theme.styles.checkbox;
checked: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("support_enable") : false; // checked: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("support_enable") : false;
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
onClicked: onClicked:
{ {
UM.MachineManager.setSettingValue("support_enable", !parent.checked) // UM.MachineManager.setSettingValue("support_enable", !parent.checked)
} }
onEntered: onEntered:
{ {
@ -271,15 +271,15 @@ Item
function populateExtruderModel() function populateExtruderModel()
{ {
extruderModel.clear() // extruderModel.clear()
var extruder_count = UM.MachineManager.getSettingValue("machine_extruder_count"); // var extruder_count = UM.MachineManager.getSettingValue("machine_extruder_count");
for(var extruder = 0; extruder < extruder_count ; extruder++) { // for(var extruder = 0; extruder < extruder_count ; extruder++) {
extruderModel.append({ // extruderModel.append({
name: catalog.i18nc("@label", "Extruder %1").arg(extruder), // name: catalog.i18nc("@label", "Extruder %1").arg(extruder),
text: catalog.i18nc("@label", "Extruder %1").arg(extruder), // text: catalog.i18nc("@label", "Extruder %1").arg(extruder),
value: extruder // value: extruder
}) // })
} // }
} }
Rectangle { Rectangle {
@ -290,7 +290,7 @@ Item
width: parent.width width: parent.width
height: childrenRect.height height: childrenRect.height
// Use both UM.ActiveProfile and UM.MachineManager to force UM.MachineManager.getSettingValue() to be reevaluated // Use both UM.ActiveProfile and UM.MachineManager to force UM.MachineManager.getSettingValue() to be reevaluated
visible: UM.ActiveProfile.settingValues.getValue("machine_extruder_count") || (UM.MachineManager.getSettingValue("machine_extruder_count") > 1) // visible: UM.ActiveProfile.settingValues.getValue("machine_extruder_count") || (UM.MachineManager.getSettingValue("machine_extruder_count") > 1)
Label { Label {
id: mainExtruderLabel id: mainExtruderLabel
@ -308,9 +308,9 @@ Item
anchors.top: parent.top anchors.top: parent.top
anchors.left: supportExtruderLabel.right anchors.left: supportExtruderLabel.right
style: UM.Theme.styles.combobox style: UM.Theme.styles.combobox
currentIndex: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("extruder_nr") : 0 // currentIndex: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("extruder_nr") : 0
onActivated: { onActivated: {
UM.MachineManager.setSettingValue("extruder_nr", index) // UM.MachineManager.setSettingValue("extruder_nr", index)
} }
} }
@ -331,7 +331,7 @@ Item
anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.left: supportExtruderLabel.right anchors.left: supportExtruderLabel.right
style: UM.Theme.styles.combobox style: UM.Theme.styles.combobox
currentIndex: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("support_extruder_nr") : 0 // currentIndex: UM.ActiveProfile.valid ? UM.ActiveProfile.settingValues.getValue("support_extruder_nr") : 0
onActivated: { onActivated: {
UM.MachineManager.setSettingValue("support_extruder_nr", index) UM.MachineManager.setSettingValue("support_extruder_nr", index)
} }
@ -341,12 +341,12 @@ Item
id: extruderModel id: extruderModel
Component.onCompleted: populateExtruderModel() Component.onCompleted: populateExtruderModel()
} }
Connections // Connections
{ // {
id: machineChange // id: machineChange
target: UM.MachineManager // target: UM.MachineManager
onActiveMachineInstanceChanged: populateExtruderModel() // onActiveMachineInstanceChanged: populateExtruderModel()
} // }
} }
Rectangle { Rectangle {