mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Merge branch 'master' of github.com:Ultimaker/Cura into feature_send_extruder_settings
This commit is contained in:
commit
8ebc75e09a
5 changed files with 14 additions and 6 deletions
|
@ -58,6 +58,9 @@ class ExtruderManager(QObject):
|
|||
cls.__instance = ExtruderManager()
|
||||
return cls.__instance
|
||||
|
||||
## Changes the active extruder by index.
|
||||
#
|
||||
# \param index The index of the new active extruder.
|
||||
@pyqtSlot(int)
|
||||
def setActiveExtruderIndex(self, index):
|
||||
self._active_extruder_index = index
|
||||
|
|
|
@ -54,10 +54,15 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel):
|
|||
for index, extruder in enumerate(manager.getMachineExtruders(global_container_stack.getBottom().getId())):
|
||||
material = extruder.findContainer({ "type": "material" })
|
||||
colour = material.getMetaDataEntry("color_code", default = "#FFFF00") if material else "#FFFF00"
|
||||
position = extruder.getBottom().getMetaDataEntry("position", default = "0") #Position in the definition.
|
||||
try:
|
||||
position = int(position)
|
||||
except ValueError: #Not a proper int.
|
||||
position = -1
|
||||
item = { #Construct an item with only the relevant information.
|
||||
"name": extruder.getName(),
|
||||
"colour": colour,
|
||||
"index": index
|
||||
"index": position
|
||||
}
|
||||
self.appendItem(item)
|
||||
self.sort(lambda item: item["index"])
|
|
@ -1043,7 +1043,7 @@
|
|||
"speed_wall_0":
|
||||
{
|
||||
"label": "Outer Wall Speed",
|
||||
"description": "The speed at which the outermost walls are printed. Printing the outer wall at a lower speed improves the final skin quality. However, having a large difference between the inner wall speed and the outer wall speed will effect quality in a negative way.",
|
||||
"description": "The speed at which the outermost walls are printed. Printing the outer wall at a lower speed improves the final skin quality. However, having a large difference between the inner wall speed and the outer wall speed will affect quality in a negative way.",
|
||||
"unit": "mm/s",
|
||||
"type": "float",
|
||||
"minimum_value": "0.1",
|
||||
|
|
|
@ -49,8 +49,7 @@ UM.ManagementPage
|
|||
onActivateObject: Cura.MachineManager.setActiveQuality(currentItem.id)
|
||||
onAddObject: {
|
||||
var selectedContainer;
|
||||
if (objectList.currentIndex == 0) {
|
||||
// Current settings
|
||||
if (objectList.currentItem.id == Cura.MachineManager.activeQualityId) {
|
||||
selectedContainer = Cura.MachineManager.convertUserContainerToQuality();
|
||||
} else {
|
||||
selectedContainer = Cura.MachineManager.duplicateContainer(base.currentItem.id);
|
||||
|
|
|
@ -110,8 +110,9 @@ Item
|
|||
checked: base.currentExtruderIndex == index
|
||||
onClicked:
|
||||
{
|
||||
base.currentExtruderIndex = index
|
||||
ExtruderManager.setActiveExtruderIndex(index)
|
||||
extruderSelection.focus = true; //Changing focus applies the currently-being-typed values so it can change the displayed setting values.
|
||||
base.currentExtruderIndex = index;
|
||||
ExtruderManager.setActiveExtruderIndex(index);
|
||||
}
|
||||
|
||||
style: ButtonStyle {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue