mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 10:17:52 -06: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
1 changed files with 8 additions and 4 deletions
|
@ -123,8 +123,7 @@ class CuraEngineBackend(Backend):
|
||||||
|
|
||||||
## Perform a slice of the scene.
|
## Perform a slice of the scene.
|
||||||
def slice(self):
|
def slice(self):
|
||||||
|
if not self._enabled: #We shouldn't be slicing.
|
||||||
if not self._enabled:
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if self._slicing:
|
if self._slicing:
|
||||||
|
@ -225,7 +224,12 @@ class CuraEngineBackend(Backend):
|
||||||
self._profile.settingValueChanged.connect(self._onSettingChanged)
|
self._profile.settingValueChanged.connect(self._onSettingChanged)
|
||||||
self._onChanged()
|
self._onChanged()
|
||||||
|
|
||||||
def _onSettingChanged(self, setting):
|
## 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()
|
self._onChanged()
|
||||||
|
|
||||||
def _onLayerMessage(self, message):
|
def _onLayerMessage(self, message):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue