Prevent spurious updates to 'onPreferenceChanged's if the preference doesn't match.

This commit is contained in:
Remco Burema 2019-01-15 17:15:12 +01:00
parent c991741a45
commit f057c9a7df
7 changed files with 35 additions and 0 deletions

View file

@ -142,6 +142,11 @@ Column
target: UM.Preferences
onPreferenceChanged:
{
if (preference !== "general/auto_slice")
{
return;
}
var autoSlice = UM.Preferences.getValue("general/auto_slice")
if(prepareButtons.autoSlice != autoSlice)
{