Order of extruders is now sorted by position

CURA-1263
This commit is contained in:
Jaime van Kessel 2016-12-16 13:29:51 +01:00
parent ff18a314ef
commit f598a49c4b
2 changed files with 13 additions and 4 deletions

View file

@ -395,7 +395,12 @@ class ExtruderManager(QObject):
# \return \type{List[ContainerStack]} a list of
def getActiveExtruderStacks(self):
global_stack = UM.Application.getInstance().getGlobalContainerStack()
return list(self._extruder_trains[global_stack.getId()].values()) if global_stack else []
result = []
if global_stack:
for extruder in sorted(self._extruder_trains[global_stack.getId()]):
result.append(self._extruder_trains[global_stack.getId()][extruder])
return result
def __globalContainerStackChanged(self):
self._addCurrentMachineExtruders()

View file

@ -127,6 +127,11 @@ UM.Dialog
model: Cura.MachineManager.activeMaterialNames
delegate: Column
{
Item // Spacer
{
height: spacerHeight
width: height
}
Label
{
text: catalog.i18nc("@action:label", "Extruder %1").arg(index+1)
@ -193,7 +198,7 @@ UM.Dialog
}
}
Item // Spacer
/*Item // Spacer
{
height: spacerHeight
width: height
@ -223,8 +228,7 @@ UM.Dialog
width: parent.width / 3
}
}
}
}*/
Item // Spacer
{