mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 23:46:22 -06:00
Tickle the backend if per object settings are changed. CURA-3273
This commit is contained in:
parent
580010b673
commit
bb955ca5ab
2 changed files with 13 additions and 4 deletions
|
@ -77,8 +77,10 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
||||||
return container_stack.getMetaDataEntry("position", default=None)
|
return container_stack.getMetaDataEntry("position", default=None)
|
||||||
|
|
||||||
def _onSettingChanged(self, instance, property_name): # Reminder: 'property' is a built-in function
|
def _onSettingChanged(self, instance, property_name): # Reminder: 'property' is a built-in function
|
||||||
if property_name == "value": # Only reslice if the value has changed.
|
# Trigger slice/need slicing if the value has changed.
|
||||||
Application.getInstance().getBackend().forceSlice()
|
if property_name == "value":
|
||||||
|
Application.getInstance().getBackend().needsSlicing()
|
||||||
|
Application.getInstance().getBackend().tickle()
|
||||||
|
|
||||||
## Makes sure that the stack upon which the container stack is placed is
|
## Makes sure that the stack upon which the container stack is placed is
|
||||||
# kept up to date.
|
# kept up to date.
|
||||||
|
@ -92,8 +94,10 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
||||||
old_extruder_stack_id = ""
|
old_extruder_stack_id = ""
|
||||||
|
|
||||||
self._stack.setNextStack(extruder_stack[0])
|
self._stack.setNextStack(extruder_stack[0])
|
||||||
if self._stack.getNextStack().getId() != old_extruder_stack_id: #Only reslice if the extruder changed.
|
# Trigger slice/need slicing if the extruder changed.
|
||||||
Application.getInstance().getBackend().forceSlice()
|
if self._stack.getNextStack().getId() != old_extruder_stack_id:
|
||||||
|
Application.getInstance().getBackend().needsSlicing()
|
||||||
|
Application.getInstance().getBackend().tickle()
|
||||||
else:
|
else:
|
||||||
UM.Logger.log("e", "Extruder stack %s below per-object settings does not exist.", self._extruder_stack)
|
UM.Logger.log("e", "Extruder stack %s below per-object settings does not exist.", self._extruder_stack)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -587,3 +587,8 @@ class CuraEngineBackend(QObject, Backend):
|
||||||
auto_slice = self.determineAutoSlicing()
|
auto_slice = self.determineAutoSlicing()
|
||||||
if auto_slice:
|
if auto_slice:
|
||||||
self._change_timer.start()
|
self._change_timer.start()
|
||||||
|
|
||||||
|
## Tickle the backend so in case of auto slicing, it starts the timer.
|
||||||
|
def tickle(self):
|
||||||
|
if self._use_timer:
|
||||||
|
self._change_timer.start()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue