mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Changing a per-object setting now forces a re-slice
CURA-1278
This commit is contained in:
parent
2abbb5c9a1
commit
388a345140
1 changed files with 6 additions and 0 deletions
|
@ -18,11 +18,17 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
|||
self._instance = InstanceContainer(container_id = "SettingOverrideInstanceContainer")
|
||||
self._stack.addContainer(self._instance)
|
||||
|
||||
self._stack.propertyChanged.connect(self._onSettingChanged)
|
||||
|
||||
ContainerRegistry.getInstance().addContainer(self._stack)
|
||||
|
||||
Application.getInstance().globalContainerStackChanged.connect(self._onGlobalContainerStackChanged)
|
||||
self._onGlobalContainerStackChanged()
|
||||
|
||||
def _onSettingChanged(self, instance, property):
|
||||
if property == "value": # Only reslice if the value has changed.
|
||||
Application.getInstance().getBackend().forceSlice()
|
||||
|
||||
def _onGlobalContainerStackChanged(self):
|
||||
## Ensure that the next stack is always the global stack.
|
||||
self._stack.setNextStack(Application.getInstance().getGlobalContainerStack())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue