Override setNextStack in GlobalStack and raise an error if called

Since the global stack should never have a next stack

Contributes to CURA-3497
This commit is contained in:
Arjen Hiemstra 2017-03-20 17:28:42 +01:00
parent b9f01b30c8
commit 0656dd53c3

View file

@ -12,6 +12,9 @@ class GlobalStack(ContainerStack):
def __init__(self, container_id, *args, **kwargs): def __init__(self, container_id, *args, **kwargs):
super().__init__(container_id, *args, **kwargs) super().__init__(container_id, *args, **kwargs)
def setNextStack(self, next_stack):
raise CannotSetNextStackError("Global stack cannot have a next stack!")
global_stack_mime = MimeType( global_stack_mime = MimeType(
name = "application/x-cura-globalstack", name = "application/x-cura-globalstack",
comment = "Cura Global Stack", comment = "Cura Global Stack",