mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 10:17:52 -06:00
CURA-4606 cleanup and optimization for replaceContainer
This commit is contained in:
parent
bf2317a74d
commit
8aab8f4394
6 changed files with 8 additions and 23 deletions
|
@ -348,6 +348,10 @@ class CuraContainerStack(ContainerStack):
|
|||
elif container != self._empty_instance_container and container.getMetaDataEntry("type") != expected_type:
|
||||
raise Exceptions.InvalidContainerError("Cannot replace container at index {index} with a container that is not of {type} type, but {actual_type} type.".format(index = index, type = expected_type, actual_type = container.getMetaDataEntry("type")))
|
||||
|
||||
current_container = self._containers[index]
|
||||
if current_container.getId() == container.getId():
|
||||
return
|
||||
|
||||
super().replaceContainer(index, container, postpone_emit)
|
||||
|
||||
## Overridden from ContainerStack
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue