mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 02:49:03 +08:00
Add doc for using setCompatibleMaterialDiameter() in QML
CURA-5834
This commit is contained in:
parent
97e6354c13
commit
ea9aa2c777
@ -621,6 +621,17 @@ Cura.MachineAction
|
|||||||
{
|
{
|
||||||
if (propertyProvider && text != propertyProvider.properties.value)
|
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)
|
if (_setValueFunction !== undefined)
|
||||||
{
|
{
|
||||||
_setValueFunction(text);
|
_setValueFunction(text);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user