Skip to content
This repository has been archived by the owner on Jan 17, 2018. It is now read-only.

Commit

Permalink
Add setting_version upon creating instance container
Browse files Browse the repository at this point in the history
We need the setting_version to be equal to the definition (unless it is missing from the definition).

Contributes to issue CURA-3427.
  • Loading branch information
Ghostkeeper committed May 15, 2017
1 parent de79b07 commit 3ba8b8e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Script.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright (c) 2015 Jaime van Kessel, Ultimaker B.V.
# Copyright (c) 2015 Jaime van Kessel
# Copyright (c) 2017 Ultimaker B.V.
# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher.
from UM.Logger import Logger
from UM.Signal import Signal, signalemitter
Expand Down Expand Up @@ -43,6 +44,7 @@ def __init__(self):
self._stack.addContainer(self._definition)
self._instance = InstanceContainer(container_id="ScriptInstanceContainer")
self._instance.setDefinition(self._definition)
self._instance.addMetaDataEntry("setting_version", self._definition.getMetaDataEntry("setting_version", default = 0))
self._stack.addContainer(self._instance)
self._stack.propertyChanged.connect(self._onPropertyChanged)

Expand Down

0 comments on commit 3ba8b8e

Please sign in to comment.