mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-16 16:45:54 +08:00
Filter setting changed listener properly
The parameters of the listener were out of date and it should only trigger a reslice if we're changing the value of a setting, not any other property. Contributes to issue CURA-1278.
This commit is contained in:
parent
e5df225b1e
commit
ab2a6136d7
@ -123,8 +123,7 @@ class CuraEngineBackend(Backend):
|
||||
|
||||
## Perform a slice of the scene.
|
||||
def slice(self):
|
||||
|
||||
if not self._enabled:
|
||||
if not self._enabled: #We shouldn't be slicing.
|
||||
return
|
||||
|
||||
if self._slicing:
|
||||
@ -225,8 +224,13 @@ class CuraEngineBackend(Backend):
|
||||
self._profile.settingValueChanged.connect(self._onSettingChanged)
|
||||
self._onChanged()
|
||||
|
||||
def _onSettingChanged(self, setting):
|
||||
self._onChanged()
|
||||
## A setting has changed, so check if we must reslice.
|
||||
#
|
||||
# \param instance The setting instance that has changed.
|
||||
# \param property The property of the setting instance that has changed.
|
||||
def _onSettingChanged(self, instance, property):
|
||||
if property == "value": #Only reslice if the value has changed.
|
||||
self._onChanged()
|
||||
|
||||
def _onLayerMessage(self, message):
|
||||
self._stored_layer_data.append(message)
|
||||
|
Loading…
x
Reference in New Issue
Block a user