mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 19:39:03 +08:00
Fix error case in addExtruder
Error out when the new size is going to be more than extruderCount instead of whether it currently is more than extruderCount.
This commit is contained in:
parent
4005f5082b
commit
4cea1b6d33
@ -113,7 +113,7 @@ class GlobalStack(ContainerStack):
|
||||
|
||||
def addExtruder(self, extruder):
|
||||
extruder_count = self.getProperty("machine_extruder_count", "value")
|
||||
if len(self._extruders) > extruder_count:
|
||||
if len(self._extruders) + 1 > extruder_count:
|
||||
raise Exceptions.TooManyExtrudersError("Tried to add extruder to {id} but its extruder count is {count}".format(id = self.id, count = extruder_count))
|
||||
|
||||
self._extruders.append(extruder)
|
||||
|
Loading…
x
Reference in New Issue
Block a user