mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06: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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue