From e8febaff59dacd03ac71917b4508c68117a1ad2a Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 2 Jan 2019 09:23:20 +0100 Subject: [PATCH] Remove code duplication --- cura/Settings/ExtruderManager.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cura/Settings/ExtruderManager.py b/cura/Settings/ExtruderManager.py index 8fa0172305..a459d65ba3 100755 --- a/cura/Settings/ExtruderManager.py +++ b/cura/Settings/ExtruderManager.py @@ -301,12 +301,7 @@ class ExtruderManager(QObject): global_stack = self._application.getGlobalContainerStack() if not global_stack: return [] - - result_tuple_list = sorted(list(global_stack.extruders.items()), key = lambda x: int(x[0])) - result_list = [item[1] for item in result_tuple_list] - - machine_extruder_count = global_stack.getProperty("machine_extruder_count", "value") - return result_list[:machine_extruder_count] + return global_stack.extruderList def _globalContainerStackChanged(self) -> None: # If the global container changed, the machine changed and might have extruders that were not registered yet