mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 15:13:56 -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._instance = InstanceContainer(container_id = "SettingOverrideInstanceContainer")
|
||||||
self._stack.addContainer(self._instance)
|
self._stack.addContainer(self._instance)
|
||||||
|
|
||||||
|
self._stack.propertyChanged.connect(self._onSettingChanged)
|
||||||
|
|
||||||
ContainerRegistry.getInstance().addContainer(self._stack)
|
ContainerRegistry.getInstance().addContainer(self._stack)
|
||||||
|
|
||||||
Application.getInstance().globalContainerStackChanged.connect(self._onGlobalContainerStackChanged)
|
Application.getInstance().globalContainerStackChanged.connect(self._onGlobalContainerStackChanged)
|
||||||
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):
|
def _onGlobalContainerStackChanged(self):
|
||||||
## Ensure that the next stack is always the global stack.
|
## Ensure that the next stack is always the global stack.
|
||||||
self._stack.setNextStack(Application.getInstance().getGlobalContainerStack())
|
self._stack.setNextStack(Application.getInstance().getGlobalContainerStack())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue