mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Prevent spurious updates to 'onPreferenceChanged's if the preference doesn't match.
This commit is contained in:
parent
c991741a45
commit
f057c9a7df
7 changed files with 35 additions and 0 deletions
|
@ -746,6 +746,11 @@ UM.PreferencesPage
|
|||
target: UM.Preferences
|
||||
onPreferenceChanged:
|
||||
{
|
||||
if (preference !== "info/send_slice_info")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info"))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -139,6 +139,11 @@ Item
|
|||
target: UM.Preferences
|
||||
onPreferenceChanged:
|
||||
{
|
||||
if (preference !== "cura/expanded_types" && preference !== "cura/expanded_brands")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
expanded = materialList.expandedBrands.indexOf(sectionName) > -1
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,6 +130,11 @@ Item
|
|||
target: UM.Preferences
|
||||
onPreferenceChanged:
|
||||
{
|
||||
if (preference !== "cura/expanded_types" && preference !== "cura/expanded_brands")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
expanded = materialList.expandedTypes.indexOf(materialType.brand + "_" + materialType.name) > -1
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue