diff options
author | Lipu Fei <lipu.fei815@gmail.com> | 2018-10-22 11:56:04 +0300 |
---|---|---|
committer | Lipu Fei <lipu.fei815@gmail.com> | 2018-10-22 11:56:11 +0300 |
commit | ea9aa2c7773899b37f582b160aea4de51b81243a (patch) | |
tree | f2aa1c7d5ed0f297a8a380f376b8f5940af46912 /plugins | |
parent | 97e6354c13be511152e8f683dde275026ee5e3eb (diff) |
Add doc for using setCompatibleMaterialDiameter() in QML
CURA-5834
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/MachineSettingsAction/MachineSettingsAction.qml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/MachineSettingsAction/MachineSettingsAction.qml b/plugins/MachineSettingsAction/MachineSettingsAction.qml index 275f1d2a41..be2b1d337a 100644 --- a/plugins/MachineSettingsAction/MachineSettingsAction.qml +++ b/plugins/MachineSettingsAction/MachineSettingsAction.qml @@ -621,6 +621,17 @@ Cura.MachineAction { if (propertyProvider && text != propertyProvider.properties.value) { + // For some properties like the extruder-compatible material diameter, they need to + // trigger many updates, such as the available materials, the current material may + // need to be switched, etc. Although setting the diameter can be done directly via + // the provider, all the updates that need to be triggered then need to depend on + // the metadata update, a signal that can be fired way too often. The update functions + // can have if-checks to filter out the irrelevant updates, but still it incurs unnecessary + // overhead. + // The ExtruderStack class has a dedicated function for this call "setCompatibleMaterialDiameter()", + // and it triggers the diameter update signals only when it is needed. Here it is optionally + // choose to use setCompatibleMaterialDiameter() or other more specific functions that + // are available. if (_setValueFunction !== undefined) { _setValueFunction(text); |