mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-19 09:10:47 +08:00
Changing a per-object setting now forces a re-slice
CURA-1278
This commit is contained in:
parent
2abbb5c9a1
commit
388a345140
@ -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…
x
Reference in New Issue
Block a user