Add a property to temporarily disable the material models from updating.

This allows the QMl to stop the updating when it's not even visible
This commit is contained in:
Jaime van Kessel 2019-02-21 20:47:38 +01:00
parent 8409d7d645
commit 7221b23457
3 changed files with 20 additions and 1 deletions

View file

@ -15,22 +15,26 @@ Menu
property int extruderIndex: 0
property string currentRootMaterialId: Cura.MachineManager.currentRootMaterialId[extruderIndex]
property string activeMaterialId: Cura.MachineManager.allActiveMaterialIds[Cura.ExtruderManager.extruderIds[extruderIndex]]
property bool updateModels: true
Cura.FavoriteMaterialsModel
{
id: favoriteMaterialsModel
extruderPosition: menu.extruderIndex
enabled: updateModels
}
Cura.GenericMaterialsModel
{
id: genericMaterialsModel
extruderPosition: menu.extruderIndex
enabled: updateModels
}
Cura.MaterialBrandsModel
{
id: brandModel
extruderPosition: menu.extruderIndex
enabled: updateModels
}
MenuItem