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