Browse Source

Order of extruders is now sorted by position

CURA-1263
Jaime van Kessel 8 years ago
parent
commit
f598a49c4b
2 changed files with 13 additions and 4 deletions
  1. 6 1
      cura/Settings/ExtruderManager.py
  2. 7 3
      resources/qml/WorkspaceSummaryDialog.qml

+ 6 - 1
cura/Settings/ExtruderManager.py

@@ -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()

+ 7 - 3
resources/qml/WorkspaceSummaryDialog.qml

@@ -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
             {