mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-23 22:29:41 +08:00
Prevent spurious updates to 'onPreferenceChanged's if the preference doesn't match.
This commit is contained in:
parent
c991741a45
commit
f057c9a7df
@ -71,6 +71,11 @@ Item
|
||||
target: UM.Preferences
|
||||
onPreferenceChanged:
|
||||
{
|
||||
if (preference !== "view/only_show_top_layers" && preference !== "view/top_layer_count" && ! preference.match("layerview/"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
playButton.pauseSimulation()
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,11 @@ Cura.ExpandableComponent
|
||||
target: UM.Preferences
|
||||
onPreferenceChanged:
|
||||
{
|
||||
if (preference !== "view/only_show_top_layers" && preference !== "view/top_layer_count" && ! preference.match("layerview/"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
layerTypeCombobox.currentIndex = UM.SimulationView.compatibilityMode ? 1 : UM.Preferences.getValue("layerview/layer_view_type")
|
||||
layerTypeCombobox.updateLegends(layerTypeCombobox.currentIndex)
|
||||
viewSettings.extruder_opacities = UM.Preferences.getValue("layerview/extruder_opacities").split("|")
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -77,6 +77,11 @@ Item
|
||||
target: UM.Preferences
|
||||
onPreferenceChanged:
|
||||
{
|
||||
if (preference !== "view/settings_list_height" && preference !== "general/window_height" && preference !== "general/window_state")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
customPrintSetup.height =
|
||||
Math.min
|
||||
(
|
||||
|
Loading…
x
Reference in New Issue
Block a user