mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-10 09:09:03 +08:00
Fix upadting list of materials when switching printers
CURA-2209
This commit is contained in:
parent
a8d8a8a7ed
commit
b004c53c6d
@ -92,7 +92,7 @@ Menu
|
||||
{
|
||||
id: materialsModel
|
||||
filter: materialFilter()
|
||||
onDataChanged: populateMenuModels()
|
||||
onModelReset: populateMenuModels()
|
||||
}
|
||||
|
||||
ExclusiveGroup { id: group }
|
||||
@ -101,17 +101,9 @@ Menu
|
||||
|
||||
MenuItem { action: Cura.Actions.manageMaterials }
|
||||
|
||||
function materialFilter(brand, material)
|
||||
function materialFilter()
|
||||
{
|
||||
var result = { "type": "material" };
|
||||
if(brand)
|
||||
{
|
||||
result.brand = brand;
|
||||
}
|
||||
if(material)
|
||||
{
|
||||
result.material = material;
|
||||
}
|
||||
if(Cura.MachineManager.filterMaterialsByMachine)
|
||||
{
|
||||
result.definition = Cura.MachineManager.activeDefinitionId;
|
||||
|
Loading…
x
Reference in New Issue
Block a user