mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-20 02:29:08 +08:00
Set the next stack before adding the user container
Since the user container may trigger a propertyChanged signal, which then requests the next stack. Contributes to issue CURA-4121.
This commit is contained in:
parent
b4be6fcb9f
commit
584e1b6abb
@ -76,6 +76,8 @@ class CuraStackBuilder:
|
|||||||
stack.setName(definition.getName())
|
stack.setName(definition.getName())
|
||||||
stack.setDefinition(definition)
|
stack.setDefinition(definition)
|
||||||
stack.addMetaDataEntry("position", definition.getMetaDataEntry("position"))
|
stack.addMetaDataEntry("position", definition.getMetaDataEntry("position"))
|
||||||
|
if "next_stack" in kwargs: #Add stacks before containers are added, since they may trigger a setting update.
|
||||||
|
stack.setNextStack(kwargs["next_stack"])
|
||||||
|
|
||||||
user_container = InstanceContainer(new_stack_id + "_user")
|
user_container = InstanceContainer(new_stack_id + "_user")
|
||||||
user_container.addMetaDataEntry("type", "user")
|
user_container.addMetaDataEntry("type", "user")
|
||||||
@ -86,9 +88,6 @@ class CuraStackBuilder:
|
|||||||
|
|
||||||
stack.setUserChanges(user_container)
|
stack.setUserChanges(user_container)
|
||||||
|
|
||||||
if "next_stack" in kwargs:
|
|
||||||
stack.setNextStack(kwargs["next_stack"])
|
|
||||||
|
|
||||||
# Important! The order here matters, because that allows the stack to
|
# Important! The order here matters, because that allows the stack to
|
||||||
# assume the material and variant have already been set.
|
# assume the material and variant have already been set.
|
||||||
if "definition_changes" in kwargs:
|
if "definition_changes" in kwargs:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user