mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07: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
1 changed files with 2 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue