mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 16:48:58 +08:00
Disable add/insert/remove container
Since we want to have a fixed list of containers in the stack. Contributes to CURA-3497
This commit is contained in:
parent
5ad0651fd1
commit
dc0c666a54
@ -105,6 +105,22 @@ class GlobalStack(ContainerStack):
|
|||||||
raise Exceptions.InvalidOperationError("Global stack cannot have a next stack!")
|
raise Exceptions.InvalidOperationError("Global stack cannot have a next stack!")
|
||||||
|
|
||||||
## Overridden from ContainerStack
|
## Overridden from ContainerStack
|
||||||
|
#
|
||||||
|
# Since we have a fixed order of containers in the stack, we want to enforce this.
|
||||||
|
@override(ContainerStack)
|
||||||
|
def addContainer(self, container: ContainerInterface) -> None:
|
||||||
|
raise Exceptions.InvalidOperationError("Cannot add a container to Global stack")
|
||||||
|
|
||||||
|
## Overridden from ContainerStack
|
||||||
|
@override(ContainerStack)
|
||||||
|
def insertContainer(self, index: int, container: ContainerInterface) -> None:
|
||||||
|
raise Exceptions.InvalidOperationError("Cannot insert a container into Global stack")
|
||||||
|
|
||||||
|
## Overridden from ContainerStack
|
||||||
|
@override(ContainerStack)
|
||||||
|
def removeContainer(self, index: int) -> None:
|
||||||
|
raise Exceptions.InvalidOperationError("Cannot remove a container from Global stack")
|
||||||
|
|
||||||
@override(ContainerStack)
|
@override(ContainerStack)
|
||||||
def deserialize(self, contents: str) -> None:
|
def deserialize(self, contents: str) -> None:
|
||||||
super().deserialize(contents)
|
super().deserialize(contents)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user