mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-07 21:19:00 +08:00
Remove unused _repopulate function
It is replaced by the addMachineExtruders function. Contributes to issues CURA-340 and CURA-1278.
This commit is contained in:
parent
b452af5dbf
commit
ec26579473
@ -80,23 +80,6 @@ class ExtruderManager(QObject):
|
||||
if extruder_trains:
|
||||
self.extrudersChanged.emit()
|
||||
|
||||
## (Re)populates the collections of extruders by machine.
|
||||
def _repopulate(self):
|
||||
self._extruder_trains = { }
|
||||
if not UM.Application.getInstance().getGlobalContainerStack(): #No machine has been added yet.
|
||||
self.extrudersChanged.emit() #Yes, we just cleared the _extruders list!
|
||||
return #Then leave them empty!
|
||||
|
||||
extruder_trains = UM.Settings.ContainerRegistry.getInstance().findContainerStacks(type = "extruder_train")
|
||||
for extruder_train in extruder_trains:
|
||||
machine_id = extruder_train.getMetaDataEntry("machine")
|
||||
if not machine_id:
|
||||
continue
|
||||
if machine_id not in self._extruder_trains:
|
||||
self._extruder_trains[machine_id] = { }
|
||||
self._extruder_trains[machine_id][extruder_train.getMetaDataEntry("position")] = extruder_train.getId()
|
||||
self.extrudersChanged.emit()
|
||||
|
||||
def createExtruderTrain(self, extruder_definition, machine_definition, extruder_train_id, position):
|
||||
container_registry = UM.Settings.ContainerRegistry.getInstance()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user